Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
autoca
Commits
f4abbe60
Commit
f4abbe60
authored
May 24, 2013
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix certificate download test
parent
034bd64a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
autovpn/test/test_vpn_app.py
autovpn/test/test_vpn_app.py
+4
-1
No files found.
autovpn/test/test_vpn_app.py
View file @
f4abbe60
...
...
@@ -26,6 +26,7 @@ class VpnAppTest(unittest.TestCase):
'''
,
'AUTH_ENABLE'
:
True
,
'AUTH_FUNCTION'
:
lambda
x
,
y
:
(
x
and
y
and
x
==
y
),
'TLS_AUTH_KEY'
:
self
.
tmpdir
+
'/tlsauth.key'
,
}
self
.
app
=
vpn_app
.
make_app
(
self
.
config
)
...
...
@@ -57,11 +58,13 @@ class VpnAppTest(unittest.TestCase):
self
.
assertTrue
(
'Authentication failed'
in
rv
.
data
)
def
test_cert_dl
(
self
):
cn
=
'testcn1234'
t
=
self
.
app
.
signer
.
encode
(
cn
)
with
self
.
app
.
test_client
()
as
c
:
with
c
.
session_transaction
()
as
sess
:
sess
[
'dl_ok'
]
=
True
sess
[
'_csrf'
]
=
'csrf'
sess
[
'logged_in'
]
=
True
rv
=
c
.
get
(
'/newcertdl?_csrf=csrf
'
)
rv
=
c
.
get
(
'/newcertdl?_csrf=csrf
&t='
+
t
)
self
.
assertEquals
(
'200 OK'
,
rv
.
status
)
self
.
assertEquals
(
'application/zip'
,
rv
.
content_type
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment