Skip to content

Tests fail with djangomaster #521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cdman opened this issue Oct 14, 2016 · 3 comments
Closed

Tests fail with djangomaster #521

cdman opened this issue Oct 14, 2016 · 3 comments

Comments

@cdman
Copy link

cdman commented Oct 14, 2016

This is a result of encode/django-rest-framework#4574:

It seems that currently django-filter fails with Django master (using both Python 2.7 and 3.5). Trace:

FAIL: test_get_filtered_detail_view (tests.rest_framework.test_backends.IntegrationTestDetailFiltering)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gpanther/greypanther/django-filter/tests/rest_framework/test_backends.py", line 362, in test_get_filtered_detail_view
    self.assertEqual(response.data, data)
AssertionError: {'id'[26 chars]al': '0.25', 'date': '2012-10-08', 'basefilterableitem_ptr': 1} != {'id'[26 chars]al': '0.25', 'date': '2012-10-08'}

======================================================================
FAIL: test_filter_with_queryset (tests.rest_framework.test_backends.IntegrationTestFiltering)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gpanther/greypanther/django-filter/tests/rest_framework/test_backends.py", line 191, in test_filter_with_queryset
    self.assertEqual(response.data, expected_data)
AssertionError: [OrderedDict([('id', 3), ('text', 'ccc'), [72 chars]3)])] != [{'id': 3, 'text': 'ccc', 'decimal': '2.25[20 chars]04'}]

======================================================================
FAIL: test_get_filtered_class_root_view (tests.rest_framework.test_backends.IntegrationTestFiltering)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gpanther/greypanther/django-filter/tests/rest_framework/test_backends.py", line 214, in test_get_filtered_class_root_view
    self.assertEqual(response.data, self.data)
AssertionError: [OrderedDict([('id', 1), ('text', 'aaa'), [1145 chars]0)])] != [{'id': 1, 'text': 'aaa', 'decimal': '0.25[624 chars]20'}]

======================================================================
FAIL: test_get_filtered_fields_root_view (tests.rest_framework.test_backends.IntegrationTestFiltering)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gpanther/greypanther/django-filter/tests/rest_framework/test_backends.py", line 161, in test_get_filtered_fields_root_view
    self.assertEqual(response.data, self.data)
AssertionError: [OrderedDict([('id', 1), ('text', 'aaa'), [1145 chars]0)])] != [{'id': 1, 'text': 'aaa', 'decimal': '0.25[624 chars]20'}]

----------------------------------------------------------------------
Ran 382 tests in 0.756s

FAILED (failures=4, skipped=9, expected failures=3)
Destroying test database for alias 'default'...
@carltongibson
Copy link
Owner

It's looking like this is an issue with DRF, Model Inheritance and __all__ on Django master encode/django-rest-framework#4648

Will keep this open just to track for now.

@carltongibson carltongibson removed the Bug label Nov 2, 2016
@rpkilby
Copy link
Collaborator

rpkilby commented Nov 2, 2016

Oddly enough, I cannot reproduce this locally.

@carltongibson
Copy link
Owner

In fact I'm pretty sure this is DRF's issue. I'll close it here. (We can always "Reopen")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants