diff --git a/helios/tests.py b/helios/tests.py index aae0e46cf3f03ce287cdfff9298eda1733fc9316..eee403577a64af5979ec751d3a481375d6a96eeb 100644 --- a/helios/tests.py +++ b/helios/tests.py @@ -2,7 +2,7 @@ Unit Tests for Helios """ -import unittest, datetime +import unittest, datetime, re import models from auth import models as auth_models @@ -258,9 +258,12 @@ class ElectionBlackboxTests(TestCase): self.assertRedirects(response, "/auth/?return_url=/helios/elections/new") def test_do_complete_election(self): + # a bogus call to set up the session + self.client.get("/") + # set up the session session = self.client.session - session['user'] = self.user + session['user'] = {'type': self.user.user_type, 'user_id': self.user.user_id} session.save() # create the election @@ -273,7 +276,11 @@ class ElectionBlackboxTests(TestCase): "use_advanced_audit_features": "1", "private_p" : "0"}) - import pdb; pdb.set_trace() + # we are redirected to the election + election_id = re.search('/elections/([^/]+)/', str(response['Location'])).group(1) + + assert False + # add helios as trustee # add a few voters diff --git a/settings.py.sample b/settings.py.sample index d9d81ca3139200cea520aeed799c375c2a415851..ec1e5acc419bbb6577c7976c3cb4f4d81793d4f0 100644 --- a/settings.py.sample +++ b/settings.py.sample @@ -74,7 +74,7 @@ TEMPLATE_DIRS = ( INSTALLED_APPS = ( # 'django.contrib.auth', - 'django.contrib.contenttypes', +# 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', ## needed for queues