Skip to content

Commit

Permalink
Fixes a test.
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandBordage committed Jan 26, 2015
1 parent c465f69 commit 62e745a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions terms/tests/terms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import unicode_literals
import os
from timeit import timeit
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.template import Template, Context
from django.test import TestCase
Expand Down Expand Up @@ -54,6 +55,8 @@ def setUp(self):
# Taken from https://criminocorpus.org/musee/282/
self.performance_test_page = read_file('performance_test_before.html')

self.user = User.objects.create_superuser('test', '[email protected]', 'test')

def assertDetailView(self, term, status_code=200):
self.assertURL(term.get_absolute_url(), status_code=status_code)

Expand Down Expand Up @@ -143,6 +146,7 @@ def test6(self):
'bw2': self.term6_2}))

def testAdminRendering(self):
self.client.login(username='test', password='test')
self.assertURL(
reverse('admin:terms_term_changelist'))
for term in Term.objects.all():
Expand Down

0 comments on commit 62e745a

Please sign in to comment.