Skip to content

Commit 59d91e9

Browse files
committed
chore: test cleanup nitpick
1 parent b521841 commit 59d91e9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Diff for: tests/functional/event_handler/test_api_gateway.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -672,33 +672,32 @@ def test_similar_dynamic_routes():
672672
app = ApiGatewayResolver()
673673
event = deepcopy(LOAD_GW_EVENT)
674674

675+
# WHEN
675676
# r'^/accounts/(?P<account_id>\\w+\\b)$' # noqa: E800
676677
@app.get("/accounts/<account_id>")
677678
def get_account(account_id: str):
678679
assert account_id == "single_account"
679-
return {"message": f"{account_id}"}
680680

681681
# r'^/accounts/(?P<account_id>\\w+\\b)/source_networks$' # noqa: E800
682682
@app.get("/accounts/<account_id>/source_networks")
683683
def get_account_networks(account_id: str):
684684
assert account_id == "nested_account"
685-
return {"message": f"{account_id}"}
686685

687686
# r'^/accounts/(?P<account_id>\\w+\\b)/source_networks/(?P<network_id>\\w+\\b)$' # noqa: E800
688687
@app.get("/accounts/<account_id>/source_networks/<network_id>")
689688
def get_network_account(account_id: str, network_id: str):
690689
assert account_id == "nested_account"
691690
assert network_id == "network"
692-
return {"message": f"{account_id}"}
693-
694-
event["resource"] = "/accounts/{account_id}/source_networks"
695-
event["path"] = "/accounts/nested_account/source_networks"
696-
app.resolve(event, None)
697691

692+
# THEN
698693
event["resource"] = "/accounts/{account_id}"
699694
event["path"] = "/accounts/single_account"
700695
app.resolve(event, None)
701696

697+
event["resource"] = "/accounts/{account_id}/source_networks"
698+
event["path"] = "/accounts/nested_account/source_networks"
699+
app.resolve(event, None)
700+
702701
event["resource"] = "/accounts/{account_id}/source_networks/{network_id}"
703702
event["path"] = "/accounts/nested_account/source_networks/network"
704703
app.resolve(event, {})

0 commit comments

Comments
 (0)