Skip to content

Instantly share code, notes, and snippets.

@BrutalSimplicity
Created August 19, 2022 21:03
Show Gist options
  • Save BrutalSimplicity/d6e74664e9475bfef3af3acb6d7d284c to your computer and use it in GitHub Desktop.
Save BrutalSimplicity/d6e74664e9475bfef3af3acb6d7d284c to your computer and use it in GitHub Desktop.

Revisions

  1. BrutalSimplicity created this gist Aug 19, 2022.
    9 changes: 9 additions & 0 deletions delete_endpoint.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    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
    ...
    5 changes: 5 additions & 0 deletions test.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    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)