Make the test really works.

This fixes the proble with debug_toolbar,
the fucking toolbar that messes all your tests.
This commit is contained in:
Michele Orrù 2017-02-11 15:47:31 +01:00
parent 376e829502
commit f0c3def935
2 changed files with 3 additions and 2 deletions

View file

@ -88,7 +88,7 @@ urlpatterns = [
url(r'^k-fet/', include('kfet.urls')),
]
if settings.DEBUG:
if 'debug_toolbar' in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns += [
url(r'^__debug__/', include(debug_toolbar.urls)),

View file

@ -68,4 +68,5 @@ class TestProfile(TestCase):
root = User.objects.create_superuser('root', 'foo@bar.com', 'root')
c = Client()
c.login(username='root', password='root')
c.get('/k-fet')
response = c.get('/')
self.assertEqual(response.status_code, 200)