From 18da849bce8d8ffd9b132145025aafd82a63326d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Sun, 14 Jul 2024 09:50:47 +0200 Subject: [PATCH] fix tests in Django 5.1 --- admin_tools_stats/tests/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin_tools_stats/tests/utils.py b/admin_tools_stats/tests/utils.py index 00e02ebb..da2c0a45 100644 --- a/admin_tools_stats/tests/utils.py +++ b/admin_tools_stats/tests/utils.py @@ -33,9 +33,11 @@ def assertContainsAny( ): total_count = 0 for text in texts: - text_repr, real_count, msg_prefix = self._assert_contains( + args = self._assert_contains( response, text, status_code, msg_prefix, html ) + real_count = args[1] + msg_prefix = args[2] total_count += real_count self.assertTrue(total_count != 0, f"None of the {texts} were found in the response: {response}")