예제 #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"}'
예제 #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"}'
예제 #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