Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1"""Test the set-up of the Flask app. 

2 

3## Domain 

4 

5* Clean slate, see `starters`. 

6 

7## Acts 

8 

9How the app is set up, difference between production and development 

10 

11`test_test` 

12: In development the `testing` attribute of the Flask app is False. 

13 

14`test_login` 

15: In development we can login all test users. 

16 

17""" 

18 

19import pytest 

20 

21import magic # noqa 

22from starters import start 

23from subtest import assertStatus 

24from example import PUBLIC 

25 

26 

27@pytest.mark.usefixtures("db") 

28def test_start(): 

29 start() 

30 

31 

32def test_test(app): 

33 assert app.testing 

34 

35 

36def test_login(clientPublic, clients): 

37 for user in clients: 

38 assertStatus(clientPublic, f"/login?eppn={user}", user != PUBLIC)