Skip to content

Commit

Permalink
correct a TestCase.setUpTestData() to be a classmethod
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Jan 30, 2025
1 parent a371690 commit 5ff02cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/model_fields_/test_embedded_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ class MyModel(models.Model):


class SubqueryExistsTests(TestCase):
def setUpTestData(self):
@classmethod
def setUpTestData(cls):
address1 = Address(city="New York", state="NY", zip_code=10001)
address2 = Address(city="Boston", state="MA", zip_code=20002)
author1 = Author(name="Alice", age=30, address=address1)
Expand Down

0 comments on commit 5ff02cd

Please sign in to comment.