コード例 #1
0
ファイル: test_awsclient.py プロジェクト: jamesls/chalice
 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()
コード例 #2
0
ファイル: test_awsclient.py プロジェクト: stBecker/chalice
 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()
コード例 #3
0
ファイル: test_awsclient.py プロジェクト: jamesls/chalice
    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')
コード例 #4
0
ファイル: test_awsclient.py プロジェクト: stBecker/chalice
    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')