-
Notifications
You must be signed in to change notification settings - Fork 2
Show and remove deprecation warnings in tests #47
Conversation
The warning was:
RemovedInDjango110Warning: You haven't defined a TEMPLATES setting.
You must do so before upgrading to Django 1.10.
Otherwise Django will be unable to load templates.
This fixes a deprecation warning:
RemovedInDjango110Warning: Support for string view arguments
to url() is deprecated and will be removed in Django 1.10.
Pass the callable instead.
Replaced with a util from incuna_test_utils.
Deprecation warning was:
RemovedInDjango110Warning: 'get_all_field_names is an unofficial API
that has been deprecated. You may be able to replace it with
'get_fields()'.
|
Blocked by #44 |
|
It looks like there're 3 other warnings (2 for /home/travis/build/meshy/django-conman/conman/redirects/handlers.py:7:
RemovedInDjango19Warning: Default value of 'RedirectView.permanent'
will change from True to False in Django 1.9. Set an explicit value
to silence this warning.
view = views.RouteRedirectView.as_view()/home/travis/build/meshy/django-conman/conman/redirects/tests/test_handlers.py:17:
RemovedInDjango19Warning: Default value of 'RedirectView.permanent'
will change from True to False in Django 1.9. Set an explicit value
to silence this warning.
expected = RouteRedirectView.as_view()/home/travis/build/meshy/django-conman/conman/routes/tests/urls.py:12:
RemovedInDjango110Warning: Support for string view arguments to url() is deprecated
and will be removed in Django 1.10 (got conman.routes.tests.urls.dummy_view). Pass
the callable instead.
url(r'^$', view_path), |
|
Yeah, I wasn't quite sure how to deal with those. The first two relate to the fact that RouteRedirectView does not explicitly set I could add I could make it a property, and move the logic out of the Alternatively, I could just use a function-based view |
|
The third warning is a bit harder -- the whole file only exists as a test, but if I replace the path with the callable function, then I need to find a new way to override it. |
|
Perhaps we just need to run |
|
I think I would set |
Seems quite reasonable. |
|
Oh I see! Except using a function (or a |
Deprecation warning was:
RemovedInDjango19Warning: Default value of 'RedirectView.permanent' will
change from True to False in Django 1.9. Set an explicit value to
silence this warning.
|
@kevinetienne @ian-foote I think it might be best to deal with the other warnings in another PR -- you happy with what's here? |
|
Nothing looks wrong on a quick scan. |
|
Looks good to me |
|
Ta! |
Show and remove deprecation warnings in tests
No description provided.