Completed
Push — main ( 254773...79af2c )
by Jochen
03:19
created

test_healthcheck_ok()   A

Complexity

Conditions 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 10
nop 1
dl 0
loc 12
rs 9.9
c 0
b 0
f 0
1
"""
2
:Copyright: 2006-2020 Jochen Kupperschmidt
3
:License: Modified BSD, see LICENSE for details.
4
"""
5
6
# Test against an admin app because that doesn't require setup of brand
7
# party. After all, both admin and party apps should react the same.
8
9
10
def test_healthcheck_ok(admin_client):
11
    expected_media_type = 'application/health+json'
12
13
    response = admin_client.get('/health')
14
15
    assert response.status_code == 200
16
    assert response.content_type == expected_media_type
17
    assert response.mimetype == expected_media_type
18
    assert response.get_json() == {
19
        'status': 'ok',
20
        'details': {
21
            'rdbms': [{'status': 'ok'}],
22
        },
23
    }
24