mirror of
https://github.com/django/django.git
synced 2025-12-11 11:50:49 +00:00
Fixed false positive tests of Paginator.count property.
This commit is contained in:
parent
129583a0d3
commit
ff5dfbc63a
1 changed files with 2 additions and 2 deletions
|
|
@ -156,7 +156,7 @@ class PaginationTests(SimpleTestCase):
|
||||||
raise AttributeError('abc')
|
raise AttributeError('abc')
|
||||||
|
|
||||||
with self.assertRaisesMessage(AttributeError, 'abc'):
|
with self.assertRaisesMessage(AttributeError, 'abc'):
|
||||||
Paginator(AttributeErrorContainer(), 10).count()
|
Paginator(AttributeErrorContainer(), 10).count
|
||||||
|
|
||||||
def test_count_does_not_silence_type_error(self):
|
def test_count_does_not_silence_type_error(self):
|
||||||
class TypeErrorContainer:
|
class TypeErrorContainer:
|
||||||
|
|
@ -164,7 +164,7 @@ class PaginationTests(SimpleTestCase):
|
||||||
raise TypeError('abc')
|
raise TypeError('abc')
|
||||||
|
|
||||||
with self.assertRaisesMessage(TypeError, 'abc'):
|
with self.assertRaisesMessage(TypeError, 'abc'):
|
||||||
Paginator(TypeErrorContainer(), 10).count()
|
Paginator(TypeErrorContainer(), 10).count
|
||||||
|
|
||||||
def check_indexes(self, params, page_num, indexes):
|
def check_indexes(self, params, page_num, indexes):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue