blob: cead68d3d50e8ecb517a56146997d332b7af6e3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
def test_home(testapp):
res = testapp.get("/")
assert res.status_code == 200
assert b'<h1 class="float-start">Home</h1>' in res.body
def test_maintenance(testapp, data_manager):
# Enable the maintenance mode:
(data_manager.data_dir / "MAINTENANCE").write_text("Abbruch, abbruch!")
try:
res = testapp.get("/", status=503)
assert b"Abbruch, abbruch" in res.body
finally:
# Make sure we disable maintenance mode for the following tests
(data_manager.data_dir / "MAINTENANCE").unlink()
|