Fix "message" parameter of pytest.raises (part 2)

This commit is contained in:
Santiago L 2022-02-09 09:29:15 +01:00
parent 4256a8ba81
commit 01b85661b9
1 changed files with 3 additions and 1 deletions

View File

@ -144,5 +144,7 @@ def test_create_existing_inventory(cli, tdb1):
cli.invoke('inv', 'add', '--common')
with tdb1.app_context():
assert db.has_schema('tdb1')
with pytest.raises(AssertionError, message='Schema tdb1 already exists.'):
with pytest.raises(AssertionError):
cli.invoke('inv', 'add', '--common')
pytest.fail('Schema tdb1 already exists.')