Commit d7db07d2 authored by Andreas Valder's avatar Andreas Valder

added logout test

parent 4b802576
......@@ -51,6 +51,15 @@ class VideoTestCase(unittest.TestCase):
assert flask.session['user']
assert r.status_code == 403
assert 'Login fehlgeschlagen' in r.data.decode()
def test_logout(self):
with self.app as c:
with c.session_transaction() as sess:
sess['user'] = {'foo': 'bar'}
r = c.get('/internal/logout', data={'ref': '/'})
assert not flask.session.get('user')
assert r.status_code == 302
assert '<a href="/">' in r.data.decode()
def test_legacyurl(self):
with self.app as c:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment