File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ def test_no_exception_conmmit_transaction(self):
49
49
response = self .view (request )
50
50
self .assertFalse (transaction .get_rollback ())
51
51
self .assertEqual (response .status_code , status .HTTP_200_OK )
52
+ assert BasicModel .objects .count () == 1
52
53
53
54
54
55
@skipUnless (connection .features .uses_savepoints ,
@@ -74,6 +75,7 @@ def test_error_rollback_transaction(self):
74
75
with transaction .atomic ():
75
76
self .assertRaises (Exception , self .view , request )
76
77
self .assertFalse (transaction .get_rollback ())
78
+ assert BasicModel .objects .count () == 1
77
79
78
80
79
81
@skipUnless (connection .features .uses_savepoints ,
@@ -103,3 +105,4 @@ def test_api_exception_rollback_transaction(self):
103
105
self .assertTrue (transaction .get_rollback ())
104
106
self .assertEqual (response .status_code ,
105
107
status .HTTP_500_INTERNAL_SERVER_ERROR )
108
+ assert BasicModel .objects .count () == 0
You can’t perform that action at this time.
0 commit comments