Beispiel #1
0
def test_inaccessible3(server, sess, bearer):
    assert server.get('/inaccessible3').status_code == 401
    assert server.get('/inaccessible3', headers=bearer).status_code == 401
Beispiel #2
0
def test_protected(server, bearer):
    print(bearer)
    assert server.get('/special').status_code == 401
    assert getitem2(
        server.get('/special', headers=bearer).get_json(), 'success') is True
Beispiel #3
0
def test_accessible3(server, sess, bearer):
    assert server.get('/accessible3').status_code == 401
    assert getitem2(
        server.get('/accessible3', headers=bearer).get_json(),
        'success') is True
Beispiel #4
0
def test_core(server):
    assert getitem2(server.get('/').get_json(), 'success') is True