test more main views, exclude csrf failure view from coverage
This commit is contained in:
parent
3d53d8f1fd
commit
b718b93453
@ -25,6 +25,9 @@ def test_views_anon(client):
|
||||
('generate_ns_secret_view', dict(pk=1), 302),
|
||||
('delete_host', dict(pk=1), 302),
|
||||
('delete_domain', dict(pk=1), 302),
|
||||
('updater_hostconfig_overview', dict(pk=1), 302),
|
||||
('updater_hostconfig', dict(pk=1), 302),
|
||||
('delete_updater_hostconfig', dict(pk=1), 302),
|
||||
# interactive updater shows http basic auth popup
|
||||
('update', dict(), 401),
|
||||
]:
|
||||
@ -49,6 +52,9 @@ def test_views_logged_in(client):
|
||||
('generate_ns_secret_view', dict(pk=1), 200),
|
||||
('delete_host', dict(pk=1), 200),
|
||||
('delete_domain', dict(pk=1), 200),
|
||||
('updater_hostconfig_overview', dict(pk=1), 200),
|
||||
('updater_hostconfig', dict(pk=1), 200),
|
||||
('delete_updater_hostconfig', dict(pk=1), 200),
|
||||
('update', dict(), 401),
|
||||
]:
|
||||
print view, kwargs, status_code
|
||||
|
@ -458,7 +458,7 @@ Disallow: /updater_hostconfig_overview/
|
||||
return HttpResponse(content, content_type="text/plain")
|
||||
|
||||
|
||||
def csrf_failure_view(request, reason):
|
||||
def csrf_failure_view(request, reason): # pragma: no cover (hard to test)
|
||||
"""
|
||||
Django's CSRF middleware's builtin view doesn't tell the user that he needs to have cookies enabled.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user