Make Moto (tests) compatible with flask/werkzeug 2.x (#3923)

* Dont fail if CodeCov fails - for now

* CI - Force cache rebuild

* Bump werkzeug to latest version

* CI - Enforce cache flush

* ManagedBlockchain - fix error format

* ManagedBlockchain - Fix tests to use pytest.raises paradigm

* Revert "Lock Flask (#3925)"

This reverts commit 8bb0feb956.

* CI - Enforce cache rebuild
This commit is contained in:
Bert Blommers 2021-05-13 10:36:56 +01:00 committed by GitHub
commit 9e3faf7784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 599 additions and 317 deletions

View file

@ -1,8 +1,10 @@
from __future__ import unicode_literals
import boto3
import pytest
import sure # noqa
from botocore.exceptions import ClientError
from moto import mock_managedblockchain
from . import helpers
@ -136,6 +138,10 @@ def test_reject_invitation_badinvitation():
Vote="YES",
)
response = conn.reject_invitation.when.called_with(
InvitationId="in-ABCDEFGHIJKLMNOP0123456789",
).should.throw(Exception, "InvitationId in-ABCDEFGHIJKLMNOP0123456789 not found.")
with pytest.raises(ClientError) as ex:
conn.reject_invitation(InvitationId="in-ABCDEFGHIJKLMNOP0123456789")
err = ex.value.response["Error"]
err["Code"].should.equal("ResourceNotFoundException")
err["Message"].should.contain(
"InvitationId in-ABCDEFGHIJKLMNOP0123456789 not found."
)