Skip to content

Commit

Permalink
more strong tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pomponchik committed Feb 1, 2024
1 parent a7fd998 commit a33d44a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/units/tokens/test_abstract_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_change_attribute_cancelled(token_fabric, first_cancelled_flag, second_c
token = token_fabric(cancelled=first_cancelled_flag)

if expected_value is None:
with pytest.raises(ValueError):
with pytest.raises(ValueError, match='You cannot restore a cancelled token.'):
token.cancelled = second_cancelled_flag

else:
Expand Down Expand Up @@ -152,7 +152,7 @@ def test_add_tokens(first_token_fabric, second_token_fabric):
],
)
def test_add_token_and_not_token(token_fabric, another_object):
with pytest.raises(TypeError):
with pytest.raises(TypeError, match='Cancellation Token can only be combined with another Cancellation Token.'):
token_fabric() + another_object

with pytest.raises(TypeError):
Expand Down

0 comments on commit a33d44a

Please sign in to comment.