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:
parent
376e829502
commit
f0c3def935
2 changed files with 3 additions and 2 deletions
|
@ -88,7 +88,7 @@ urlpatterns = [
|
||||||
url(r'^k-fet/', include('kfet.urls')),
|
url(r'^k-fet/', include('kfet.urls')),
|
||||||
]
|
]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if 'debug_toolbar' in settings.INSTALLED_APPS:
|
||||||
import debug_toolbar
|
import debug_toolbar
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||||
|
|
|
@ -68,4 +68,5 @@ class TestProfile(TestCase):
|
||||||
root = User.objects.create_superuser('root', 'foo@bar.com', 'root')
|
root = User.objects.create_superuser('root', 'foo@bar.com', 'root')
|
||||||
c = Client()
|
c = Client()
|
||||||
c.login(username='root', password='root')
|
c.login(username='root', password='root')
|
||||||
c.get('/k-fet')
|
response = c.get('/')
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
Loading…
Reference in a new issue