From 9e8717e7e51cdd36a22b4ee001bef2e7952565ad Mon Sep 17 00:00:00 2001 From: Emmanouil Konstantinidis Date: Fri, 1 Jan 2016 20:07:14 +0000 Subject: [PATCH] Fix tests --- rest_framework_docs/views.py | 2 +- tests/tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework_docs/views.py b/rest_framework_docs/views.py index f8b81a1..04074cc 100644 --- a/rest_framework_docs/views.py +++ b/rest_framework_docs/views.py @@ -10,7 +10,7 @@ class DRFDocsView(TemplateView): def get_context_data(self, **kwargs): settings = DRFSettings().settings - if not settings["HIDE_DOCS"]: + if settings["HIDE_DOCS"]: raise Http404("Django Rest Framework Docs are hidden. Check your settings.") context = super(DRFDocsView, self).get_context_data(**kwargs) diff --git a/tests/tests.py b/tests/tests.py index 8a4b92b..afb58d0 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -16,7 +16,7 @@ def test_settings_module(self): settings = DRFSettings() - self.assertEqual(settings.get_setting("HIDE_DOCS"), True) + self.assertEqual(settings.get_setting("HIDE_DOCS"), False) self.assertEqual(settings.get_setting("TEST"), None) def test_index_view_with_endpoints(self):