Skip to content

Commit 2e8115a

Browse files
authored
feature: add missing test condition (#581)
1 parent f7c2ec6 commit 2e8115a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tests/infrastructure/test_cdk.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ def test_synthesizes_properly():
1414

1515
# verify that we have one API GW, that is it not deleted by mistake
1616
template.resource_count_is('AWS::ApiGateway::RestApi', 1)
17+
template.resource_count_is('AWS::DynamoDB::Table', 1)

tests/integration/test_create_order.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ def mock_exception_dynamic_configuration(mocker) -> None:
4747
def test_handler_200_ok(mocker, table_name: str):
4848
mock_dynamic_configuration(mocker, MOCKED_SCHEMA)
4949
customer_name = 'RanTheBuilder'
50-
body = Input(customer_name=customer_name, order_item_count=5, tier='premium')
50+
order_item_count = 5
51+
body = Input(customer_name=customer_name, order_item_count=order_item_count, tier='premium')
5152
response = create_order(generate_api_gw_event(body.dict()), generate_context())
5253
# assert response
5354
assert response['statusCode'] == HTTPStatus.OK
@@ -60,6 +61,7 @@ def test_handler_200_ok(mocker, table_name: str):
6061
response = dynamodb_table.get_item(Key={'order_id': body_dict['order_id']})
6162
assert 'Item' in response # order was found
6263
assert response['Item']['customer_name'] == customer_name
64+
assert response['Item']['count'] == order_item_count
6365

6466

6567
def test_internal_server_error(mocker):

0 commit comments

Comments
 (0)