Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helios Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
d1dbfbd5
Commit
d1dbfbd5
authored
14 years ago
by
Ben Adida
Browse files
Options
Downloads
Patches
Plain Diff
got the session testing working
parent
90703859
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
helios/tests.py
+10
-3
10 additions, 3 deletions
helios/tests.py
settings.py.sample
+1
-1
1 addition, 1 deletion
settings.py.sample
with
11 additions
and
4 deletions
helios/tests.py
+
10
−
3
View file @
d1dbfbd5
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
settings.py.sample
+
1
−
1
View file @
d1dbfbd5
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment