From d8b265b0ca28b2bc7ae66fc552e415dbe7ba638f Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 12 Oct 2020 14:14:12 +0100 Subject: [PATCH] Add comments to make test data clearer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s not clear where 103 is coming from unless you know that the code is doing the slightly unintuitive thing of displaying the max of all return values. --- tests/app/main/views/test_platform_admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/app/main/views/test_platform_admin.py b/tests/app/main/views/test_platform_admin.py index de704e0a2..1f1fb9757 100644 --- a/tests/app/main/views/test_platform_admin.py +++ b/tests/app/main/views/test_platform_admin.py @@ -689,9 +689,13 @@ def test_clear_cache_shows_form(client_request, platform_admin_user, mocker): @pytest.mark.parametrize('model_type, expected_calls, expected_confirmation', ( ('template', [ + # Returns 101 call('service-????????-????-????-????-????????????-templates'), + # Returns 102 call('service-????????-????-????-????-????????????-template-????????-????-????-????-????????????-version-*'), + # Returns 103 call('service-????????-????-????-????-????????????-template-????????-????-????-????-????????????-versions'), + # 103 shown here because it’s the `max` of the 3 counts ], 'Removed 103 template objects from redis'), ('service', [ call('has_jobs-????????-????-????-????-????????????'),