From 435c13038cb6e92bfaa37df326bea3c5d6ad5074 Mon Sep 17 00:00:00 2001 From: Andreas <andreasv@fsmpi.rwth-aachen.de> Date: Sat, 2 Dec 2017 22:30:02 +0100 Subject: [PATCH] added test to add a course as not logged in user --- tests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests.py b/tests.py index dab2a26..ebc12ae 100755 --- a/tests.py +++ b/tests.py @@ -60,9 +60,15 @@ class VideoTestCase(unittest.TestCase): def test_edit(self): with self.app as c: + # test auth + r = c.get('/internal/new/courses', data={'title': 'Neue Vera14352345nstaltung totalyrandomcrap', 'responsible': 'foo', 'handle': '2r5sQ46z4w3DFCRT3<F4>DG', '_csrf_token': 'asd'}) + assert r.status_code != 200 + + # all other tests are done logged in with c.session_transaction() as sess: sess['user'] = {'name': 'videoag', '_csrf_token': 'asd', 'dbid': 72} sess['_csrf_token'] = 'asd' + # add course r = c.get('/internal/new/courses', data={'title': 'Neue Veranstaltung totalyrandomcrap', 'responsible': 'foo', 'handle': '2r5sQDFCRT3DG', '_csrf_token': 'asd'}) assert r.status_code == 200 -- GitLab