mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
cleaned up test a little to show problem in a cleaner way
This commit is contained in:
parent
bd225c49ce
commit
b54c76b9fd
23
#.gitignore#
Normal file
23
#.gitignore#
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
*.pyc
|
||||||
|
*.db
|
||||||
|
*~
|
||||||
|
.*
|
||||||
|
|
||||||
|
html/
|
||||||
|
htmlcov/
|
||||||
|
coverage/
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
*.egg-info/
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
bin/
|
||||||
|
include/
|
||||||
|
lib/
|
||||||
|
local/
|
||||||
|
|
||||||
|
*.iml
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
!.gitignore
|
||||||
|
!.travis.yml
|
|
@ -769,8 +769,8 @@ class Iso8601DateTimeFilter(TestCase):
|
||||||
# This shows that the you cannot filter via an isoformatted datetime
|
# This shows that the you cannot filter via an isoformatted datetime
|
||||||
self.assertNotEqual(response.data, expected_data)
|
self.assertNotEqual(response.data, expected_data)
|
||||||
# This shows that the issues is not Django filters itself but how the filters are built via iexact
|
# This shows that the issues is not Django filters itself but how the filters are built via iexact
|
||||||
should_find_something = FilterableISO8601Item.objects.filter(date__iexact=search_date.isoformat())
|
should_not_find_something = FilterableISO8601Item.objects.filter(date__iexact=search_date.isoformat())
|
||||||
should_find_something_2 = FilterableISO8601Item.objects.filter(date=search_date.isoformat())
|
should_find_something = FilterableISO8601Item.objects.filter(date=search_date.isoformat())
|
||||||
self.assertEqual(should_find_something.count(), 0)
|
self.assertEqual(should_not_find_something.count(), 0)
|
||||||
# The issue is that dates are being filtered via an iexact filter which does date comparision
|
# The issue is that dates are being filtered via an iexact filter which does date comparision
|
||||||
self.assertNotEqual(should_find_something.query.__str__(), should_find_something_2.query.__str__())
|
self.assertNotEqual(should_find_something.count(), should_not_find_something.count())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user