File: 0004-Update_test_for_python_3.13_argparse_changes.patch

package info (click to toggle)
hyperkitty 1.3.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,996 kB
  • sloc: javascript: 38,879; python: 12,081; makefile: 157; sh: 5
file content (25 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
commit 6c3d402dc0981e545081a3baf13db7e491356e75
Author: Mark Sapiro <mark@msapiro.net>
Date:   Sat Dec 21 12:03:12 2024 -0800

    Update test for python 3.13 argparse changes.

diff --git a/hyperkitty/tests/commands/test_attachments_to_file.py b/hyperkitty/tests/commands/test_attachments_to_file.py
index b3e61f3a..fd0aed84 100644
--- a/hyperkitty/tests/commands/test_attachments_to_file.py
+++ b/hyperkitty/tests/commands/test_attachments_to_file.py
@@ -90,9 +90,8 @@ class CommandTestCase(TestCase):
                 call_command('attachments_to_file', '--help')
 
             output_value = fp.getvalue()
-            assert (
-                "HYPERKITTY_ATTACHMENT_FOLDER" in output_value
-                and "-c CHUNK_SIZE" in output_value
-                and "-c CHUNK_SIZE, --chunk-size CHUNK_SIZE" in output_value
-                and "-v {0,1}, --verbosity {0,1}" in output_value
-            )
+            self.assertRegex(output_value,
+                             "(?s)HYPERKITTY_ATTACHMENT_FOLDER.*"
+                             "-c( CHUNK_SIZE)?, --chunk-size CHUNK_SIZE.*"
+                             r"-v( \{0,1\})?, --verbosity \{0,1\}"
+                             )