Skip to content

Commit 1817784

Browse files
committed
Clean up tests a bit
1 parent 9069063 commit 1817784

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

tests/test_low_level.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def base(db):
1414
case.tearDown()
1515

1616

17-
def test_ttl(base, django_assert_num_queries):
17+
def test_ttl(base):
1818
user = User.objects.create(username='Suor')
1919
qs = User.objects.cache(timeout=100).filter(pk=user.pk)
2020
list(qs)

tests/tests.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -648,11 +648,8 @@ def test_365(self):
648648
def test_385(self):
649649
Client.objects.create(name='Client Name')
650650

651-
with self.assertRaises(AttributeError) as e:
651+
with self.assertRaisesRegex(AttributeError, "local object"):
652652
Client.objects.filter(name='Client Name').cache().first()
653-
self.assertEqual(
654-
str(e.exception),
655-
"Can't pickle local object 'Client.__init__.<locals>.curry.<locals>._curried'")
656653

657654
invalidate_model(Client)
658655

@@ -721,8 +718,8 @@ def test_430_no_error_raises(self):
721718
media_type.delete()
722719

723720
def test_480(self):
724-
orm_lookups = ['title__icontains', 'category__title__icontains', ]
725-
search_terms = ['1', "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"]
721+
orm_lookups = ['title__icontains', 'category__title__icontains']
722+
search_terms = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13']
726723
queryset = Post.objects.filter(visible=True)
727724
conditions = []
728725
for search_term in search_terms:

0 commit comments

Comments
 (0)