Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/infrastructure/test_cdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ def test_synthesizes_properly():

# verify that we have one API GW, that is it not deleted by mistake
template.resource_count_is('AWS::ApiGateway::RestApi', 1)
template.resource_count_is('AWS::DynamoDB::Table', 1)
4 changes: 3 additions & 1 deletion tests/integration/test_create_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def mock_exception_dynamic_configuration(mocker) -> None:
def test_handler_200_ok(mocker, table_name: str):
mock_dynamic_configuration(mocker, MOCKED_SCHEMA)
customer_name = 'RanTheBuilder'
body = Input(customer_name=customer_name, order_item_count=5, tier='premium')
order_item_count = 5
body = Input(customer_name=customer_name, order_item_count=order_item_count, tier='premium')
response = create_order(generate_api_gw_event(body.dict()), generate_context())
# assert response
assert response['statusCode'] == HTTPStatus.OK
Expand All @@ -60,6 +61,7 @@ def test_handler_200_ok(mocker, table_name: str):
response = dynamodb_table.get_item(Key={'order_id': body_dict['order_id']})
assert 'Item' in response # order was found
assert response['Item']['customer_name'] == customer_name
assert response['Item']['count'] == order_item_count


def test_internal_server_error(mocker):
Expand Down