diff --git a/autovpn/test/test_vpn_app.py b/autovpn/test/test_vpn_app.py index 4549fd20054ef0b5a48a2d5cc531351d6c9bb4e6..0fefdec656f7298277e6630da3c478ffb4374682 100644 --- a/autovpn/test/test_vpn_app.py +++ b/autovpn/test/test_vpn_app.py @@ -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)