From 576806da67ed80de6230378651e9f5e92a2dc92c Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Thu, 22 Jul 2021 15:21:00 -0400
Subject: [PATCH] Let hypothesis shrink num_redemption_groups

It doesn't make the test much faster ... but maybe a little?  It does slightly
improve failures by producing fewer giant base64 strings.
---
 src/_zkapauthorizer/tests/test_client_resource.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/_zkapauthorizer/tests/test_client_resource.py b/src/_zkapauthorizer/tests/test_client_resource.py
index a4f2098..2bee0fb 100644
--- a/src/_zkapauthorizer/tests/test_client_resource.py
+++ b/src/_zkapauthorizer/tests/test_client_resource.py
@@ -776,9 +776,10 @@ class UnblindedTokenTests(TestCase):
         tahoe_configs(),
         api_auth_tokens(),
         vouchers(),
-        integers(min_value=0, max_value=100),
+        integers(min_value=1, max_value=16),
+        integers(min_value=1, max_value=128),
     )
-    def test_get_order_matches_use_order(self, get_config, api_auth_token, voucher, extra_tokens):
+    def test_get_order_matches_use_order(self, get_config, api_auth_token, voucher, num_redemption_groups, extra_tokens):
         """
         The first unblinded token returned in a response to a **GET** request is
         the first token to be used to authorize a storage request.
@@ -816,6 +817,7 @@ class UnblindedTokenTests(TestCase):
         )
         root = root_from_config(config, datetime.now)
 
+        root.controller.num_redemption_groups = num_redemption_groups
         num_tokens = root.controller.num_redemption_groups + extra_tokens
 
         # Put in a number of tokens with which to test.
-- 
GitLab