示例#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