示例#1
0
def test_check_intermediate_fib(create_db):
    path = 'http://127.0.0.1:5000/fib/13'
    response = requests.get(path)
    populate.populate_test_table(path, response.status_code)
    assert response.status_code == 200
    assert response.content.decode(
        "utf-8"
    ) == '[[13], [8, 5], [8, 3, 2], [5, 5, 3], [5, 3, 3, 2], [5, 2, 2, 2, 2], [3, 3, 3, 2, 2], [3, 2, 2, 2, 2, 2]]'
示例#2
0
def test_check_letter():
    path = 'http://127.0.0.1:5000/fib/a'
    response = requests.get(path)
    populate.populate_test_table(path, response.status_code)
    assert response.status_code == 200
    assert response.content.decode("utf-8") == '[]'