Created
August 19, 2022 21:03
-
-
Save BrutalSimplicity/d6e74664e9475bfef3af3acb6d7d284c to your computer and use it in GitHub Desktop.
hook/test example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
def hook(config_file, **kwargs): | |
events = boto3.client('events') | |
delete_endpoint(events, config_file, kwargs) | |
def delete_endpoint(, config_file, **kwargs): | |
# move work here | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_hook_endpoint_not_exists(): | |
# same stubber setup | |
# pass the reference to the eb client you create in the test session into the | |
# function doing the work | |
delete_endpoint.delete_endpoint(stubbed_eb_client, config_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment