File tree 1 file changed +4
-1
lines changed
backend/globaleaks/tests/handlers/admin
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
from globaleaks import models
4
4
from globaleaks .handlers import admin
5
- from globaleaks .handlers .admin .field import create_field
5
+ from globaleaks .handlers .admin .field import create_field , delete_field
6
6
from globaleaks .orm import transact
7
7
from globaleaks .rest import errors
8
8
from globaleaks .tests import helpers
@@ -49,6 +49,9 @@ def test_post_create_from_template(self):
49
49
self .assertIn ('id' , response )
50
50
self .assertNotEqual (response .get ('options' ), None )
51
51
52
+ # Ensure it is not possible to delete a template that is in use
53
+ yield self .assertFailure (delete_field (1 , field_template ['id' ]), errors .InputValidationError )
54
+
52
55
53
56
class TestFieldInstance (helpers .TestHandler ):
54
57
_handler = admin .field .FieldInstance
You can’t perform that action at this time.
0 commit comments