Skip to content

Commit 5ff02cd

Browse files
committed
correct a TestCase.setUpTestData() to be a classmethod
1 parent a371690 commit 5ff02cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/model_fields_/test_embedded_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ class MyModel(models.Model):
256256

257257

258258
class SubqueryExistsTests(TestCase):
259-
def setUpTestData(self):
259+
@classmethod
260+
def setUpTestData(cls):
260261
address1 = Address(city="New York", state="NY", zip_code=10001)
261262
address2 = Address(city="Boston", state="MA", zip_code=20002)
262263
author1 = Author(name="Alice", age=30, address=address1)

0 commit comments

Comments
 (0)