Exemplo n.º 1
0
def test_endpoint_BissextPost(year, expected_result):
    query = {
        "Years": year,
    }
    code, body = execute_endpoint("BissextPost", query=query)
    assert code == 201
    assert body["item"]["isBissext"] == expected_result
Exemplo n.º 2
0
def test_endpoint_BissextPost(year, expected_result):
    query = {
        "Years": year,
    }
    code, body = execute_endpoint("BissextPost", query=query)
    assert code == 201
    assert body["item"]["isBissext"] == expected_result
Exemplo n.º 3
0
def test_endpoint_FibPost(n, fibN):
    query = {
        "n": n,
    }
    code, body = execute_endpoint("FibPost", query=query)
    assert code == 201
    assert body["item"]["fibN"] == fibN
Exemplo n.º 4
0
def test_endpoint_BissextList():
    code, body = execute_endpoint("BissextList")
    assert code == 200
    assert "_metadata" in body
Exemplo n.º 5
0
def test_endpoint_HealthGet():
    code, body = execute_endpoint("HealthGet")
    assert code == 200
    assert body["_metadata"]["status"] == 0
Exemplo n.º 6
0
def test_endpoint_FibDelete(id):
    path_args = {"id": id}
    body = {}
    code, body = execute_endpoint("FibDelete", path_args=path_args, body=body)
    assert code == 200
    assert "_metadata" in body
Exemplo n.º 7
0
def test_endpoint_BissextPut(id):
    path_args = {"id": id}
    body = {}
    code, body = execute_endpoint("BissextPut", path_args=path_args, body=body)
    assert code == 200
    assert "_metadata" in body