Ejemplo n.º 1
0
 def test_rest_api_delete(self, stubbed_session):
     stubbed_session.stub('apigateway')\
                    .delete_rest_api(restApiId='name').returns({})
     stubbed_session.activate_stubs()
     awsclient = TypedAWSClient(stubbed_session)
     assert awsclient.delete_rest_api('name') is None
     stubbed_session.verify_stubs()
Ejemplo n.º 2
0
 def test_rest_api_delete(self, stubbed_session):
     stubbed_session.stub('apigateway')\
                    .delete_rest_api(restApiId='name').returns({})
     stubbed_session.activate_stubs()
     awsclient = TypedAWSClient(stubbed_session)
     assert awsclient.delete_rest_api('name') == None
     stubbed_session.verify_stubs()
Ejemplo n.º 3
0
    def test_rest_api_delete_already_deleted(self, stubbed_session):
        stubbed_session.stub('apigateway')\
                       .delete_rest_api(restApiId='name')\
                       .raises_error(error_code='NotFoundException',
                                     message='Unknown')
        stubbed_session.activate_stubs()

        awsclient = TypedAWSClient(stubbed_session)
        with pytest.raises(ResourceDoesNotExistError):
            assert awsclient.delete_rest_api('name')
Ejemplo n.º 4
0
    def test_rest_api_delete_already_deleted(self, stubbed_session):
        stubbed_session.stub('apigateway')\
                       .delete_rest_api(restApiId='name')\
                       .raises_error(error_code='NotFoundException',
                                     message='Unknown')
        stubbed_session.activate_stubs()

        awsclient = TypedAWSClient(stubbed_session)
        with pytest.raises(ResourceDoesNotExistError):
            assert awsclient.delete_rest_api('name')