Skip to content
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

Issue against Django master, especially Django Guardian #3406

Closed
carltongibson opened this issue Sep 15, 2015 · 4 comments
Closed

Issue against Django master, especially Django Guardian #3406

carltongibson opened this issue Sep 15, 2015 · 4 comments
Labels

Comments

@carltongibson
Copy link
Collaborator

Running against Django master there are a lot of issues.

1 warnings, 265 error in 137.92 seconds

Most of these are caused by Django Guardian.

Excluding that from the requirements leads to something more reasonable:

5 failed, 239 passed, 1 warnings, 21 error in 11.27 seconds

Only two types of failure:

tests/test_utils.py:153: in setUp
    self.get_model = rest_framework.utils.model_meta.models.get_model
E   AttributeError: module 'django.db.models' has no attribute 'get_model'

...

tests/browsable_api/test_browsable_api.py:36: in test_login_shown_when_logged_out
    self.assertContains(response, '>Log in<')
.tox/py35-djangomaster/lib/python3.5/site-packages/django/test/testcases.py:398: in assertContains
    msg_prefix + "Couldn't find %s in response" % text_repr)
E   AssertionError: False is not true : Couldn't find '>Log in<' in response

Errors are all these:

.tox/py35-djangomaster/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:682:
...
E   TypeError: Call constructor takes either 0 or 3 positional arguments

...
tests/test_filters.py:11: in <module>
    from django.utils import unittest
E   ImportError: cannot import name 'unittest'

I don't think there's much work there but it's masked by the Guardian issues.

@tomchristie
Copy link
Member

3.3 branch resolves much of this: #3342

@carltongibson
Copy link
Collaborator Author

OK. Most of this is the issue with Django Guardian then... #3342 still has that bucket load of failures against Django master.

It would be nice to not have those — I'll have a look and see if there's a simple way to exclude a single requirement for the djangomaster envs

carltongibson pushed a commit to carltongibson/django-rest-framework that referenced this issue Sep 15, 2015
@carltongibson
Copy link
Collaborator Author

OK. Can do this sort of thing:

[testenv:py35-djangomaster] # Specify explicitly to exclude Django Guardian against Django master
deps =
       https://github.com/django/django/archive/master.tar.gz
       -rrequirements/requirements-testing.txt
       markdown==2.5.2
       django-filter==0.10.0

Will wait on #3405 so as not to repeat myself rebasing everywhere.

@carltongibson
Copy link
Collaborator Author

Fixed in v3.3 branch (by #3427)

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

No branches or pull requests

2 participants