Ejemplo n.º 1
0
def test_ok_200_dict():
    response = Response()
    check = response.ok_200({'my_data': 'dict of data to return'})
    assert check['statusCode'] == 200
    assert check['body'] == '{"my_data": "dict of data to return"}'
Ejemplo n.º 2
0
def test_ok_200_JSON():
    response = Response()
    check = response.ok_200('{"my_data": "big blob of JSON"}')
    assert check['statusCode'] == 200
    assert check['body'] == '{"my_data": "big blob of JSON"}'
Ejemplo n.º 3
0
def test_ok_200():
    response = Response()
    check = response.ok_200()
    assert check['statusCode'] == 200
    assert check['headers']['Access-Control-Allow-Origin'] == '*'
    assert check['body'] is None