diff --git a/src/_zkapauthorizer/tests/test_client_resource.py b/src/_zkapauthorizer/tests/test_client_resource.py index f81098452c95682eac683f12d7cb1bc6020d974f..1df93936c70090dc31f36ac5db75b93b1365458f 100644 --- a/src/_zkapauthorizer/tests/test_client_resource.py +++ b/src/_zkapauthorizer/tests/test_client_resource.py @@ -53,8 +53,8 @@ from testtools.matchers import ( IsInstance, ContainsDict, AfterPreprocessing, + Is, Equals, - NotEquals, Always, GreaterThan, ) @@ -650,9 +650,11 @@ class VoucherTests(TestCase): ).encode("ascii"), ) if redeemed: - token_count_comparison = NotEquals + # Value duplicated from PaymentController.redeem default. Should + # do this better. + token_count_comparison = Equals(100) else: - token_count_comparison = Equals + token_count_comparison = Is(None) self.assertThat( getting, @@ -668,7 +670,7 @@ class VoucherTests(TestCase): number=Equals(voucher), created=Equals(now), redeemed=Equals(redeemed), - token_count=token_count_comparison(None), + token_count=token_count_comparison, ), ), ),