We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95defc5 commit f6194b7Copy full SHA for f6194b7
tests/test_model.py
@@ -60,6 +60,20 @@ def test_update_model():
60
assert SimpleModel.objects.count() == 1
61
62
63
+def test_delete_from_model():
64
+ with captured_queries(connection) as ctx:
65
+ assert SimpleModel.objects.count() == 0
66
+ SimpleModel.objects.create()
67
+ SimpleModel.refresh()
68
+
69
+ assert SimpleModel.objects.count() == 1
70
+ SimpleModel.objects.all().delete()
71
+ assert ctx.latest_query.stmt == 'DELETE FROM "test_app_simplemodel"'
72
73
74
75
76
77
def test_insert_all_fields():
78
"""Test that an object is created and accounted for with all supported field types"""
79
0 commit comments