Skip to content

Commit 5037fc0

Browse files
committed
Used non-fixed id for test.
Database is not torn down after each run, which means that the id is incrementing
1 parent 84a37d2 commit 5037fc0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/core/tests/test_widgets.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,7 @@ def setUp(self):
187187
self.author = Author.objects.create(name='Foo')
188188

189189
def test_clean(self):
190-
print(Author.objects.all().count())
191-
print(Author.objects.filter(name='Foo').count())
192-
self.assertEqual(self.widget.clean(1), self.author)
190+
self.assertEqual(self.widget.clean(self.author.id), self.author)
193191

194192
def test_clean_empty(self):
195193
self.assertEqual(self.widget.clean(""), None)

0 commit comments

Comments
 (0)