diff options
Diffstat (limited to 'net-nntp/sabnzbd/files/sabnzbd-3.7.2-tavern-2.patch')
-rw-r--r-- | net-nntp/sabnzbd/files/sabnzbd-3.7.2-tavern-2.patch | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/net-nntp/sabnzbd/files/sabnzbd-3.7.2-tavern-2.patch b/net-nntp/sabnzbd/files/sabnzbd-3.7.2-tavern-2.patch new file mode 100644 index 000000000000..60945d596d41 --- /dev/null +++ b/net-nntp/sabnzbd/files/sabnzbd-3.7.2-tavern-2.patch @@ -0,0 +1,128 @@ +From c8125e93bfb0963876992cb50c2442220c0ec300 Mon Sep 17 00:00:00 2001 +From: jcfp <jcfp@debian.org> +Date: Mon, 20 Feb 2023 16:29:34 +0100 +Subject: [PATCH] convert tests to tavern 2.0.0+ + +--- + tests/data/tavern/api_get_files_format.yaml | 2 +- + tests/data/tavern/api_history_empty.yaml | 2 +- + tests/data/tavern/api_history_format.yaml | 2 +- + tests/data/tavern/api_queue_empty.yaml | 2 +- + tests/data/tavern/api_queue_format.yaml | 2 +- + tests/data/tavern/api_server_stats.yaml | 2 +- + tests/data/tavern/api_version.yaml | 4 ++-- + tests/requirements.txt | 2 +- + 8 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/tests/data/tavern/api_get_files_format.yaml b/tests/data/tavern/api_get_files_format.yaml +index e46823085b..9315fc27f8 100755 +--- a/tests/data/tavern/api_get_files_format.yaml ++++ b/tests/data/tavern/api_get_files_format.yaml +@@ -56,7 +56,7 @@ stages: + pragma: "no-cache" + access-control-allow-origin: "*" + verify_response_with: +- function: tavern.testutils.helpers:validate_regex ++ function: tavern.helpers:validate_regex + extra_kwargs: + # Verify response parameters with a regex using positive + # looksaheads, so parameters match regardless of their order +diff --git a/tests/data/tavern/api_history_empty.yaml b/tests/data/tavern/api_history_empty.yaml +index 0d15faabd5..22fa4e4511 100755 +--- a/tests/data/tavern/api_history_empty.yaml ++++ b/tests/data/tavern/api_history_empty.yaml +@@ -54,7 +54,7 @@ stages: + access-control-allow-origin: "*" + content-length: !re_match "[0-9]+" + verify_response_with: +- function: tavern.testutils.helpers:validate_regex ++ function: tavern.helpers:validate_regex + extra_kwargs: + # Verify response with a regex using positive looksaheads so + # parameters match regardless of their order of appearance +diff --git a/tests/data/tavern/api_history_format.yaml b/tests/data/tavern/api_history_format.yaml +index 99c64098e1..45de020706 100755 +--- a/tests/data/tavern/api_history_format.yaml ++++ b/tests/data/tavern/api_history_format.yaml +@@ -87,7 +87,7 @@ stages: + access-control-allow-origin: "*" + content-length: !re_match "[0-9]+" + verify_response_with: +- function: tavern.testutils.helpers:validate_regex ++ function: tavern.helpers:validate_regex + extra_kwargs: + # Verify response parameters with a regex using positive looksaheads, + # so parameters match regardless of their order of appearance. Note +diff --git a/tests/data/tavern/api_queue_empty.yaml b/tests/data/tavern/api_queue_empty.yaml +index d80d026e0e..5a3f45e2ea 100755 +--- a/tests/data/tavern/api_queue_empty.yaml ++++ b/tests/data/tavern/api_queue_empty.yaml +@@ -78,7 +78,7 @@ stages: + access-control-allow-origin: "*" + content-length: !re_match "[0-9]+" + verify_response_with: +- function: tavern.testutils.helpers:validate_regex ++ function: tavern.helpers:validate_regex + extra_kwargs: + # Verify only a bunch of key response parameters with a regex using + # positive looksaheads, so parameters match regardless of their order +diff --git a/tests/data/tavern/api_queue_format.yaml b/tests/data/tavern/api_queue_format.yaml +index 8411f4a272..fcbe708785 100755 +--- a/tests/data/tavern/api_queue_format.yaml ++++ b/tests/data/tavern/api_queue_format.yaml +@@ -98,7 +98,7 @@ stages: + access-control-allow-origin: "*" + content-length: !re_match "[0-9]+" + verify_response_with: +- function: tavern.testutils.helpers:validate_regex ++ function: tavern.helpers:validate_regex + extra_kwargs: + # Verify only a bunch of key response parameters with a regex using + # positive looksaheads, so parameters match regardless of their order +diff --git a/tests/data/tavern/api_server_stats.yaml b/tests/data/tavern/api_server_stats.yaml +index b42a1f2a38..a94a3b7823 100755 +--- a/tests/data/tavern/api_server_stats.yaml ++++ b/tests/data/tavern/api_server_stats.yaml +@@ -47,7 +47,7 @@ stages: + content-length: !re_match "[0-9]+" + status_code: 200 + verify_response_with: +- function: tavern.testutils.helpers:validate_regex ++ function: tavern.helpers:validate_regex + extra_kwargs: + expression: "{{(?=.*'total': [0-9]+)(?=.*'month': [0-9]+)(?=.*'week': [0-9]+)(?=.*'day': [0-9]+)(?=.*'servers': .*).*}}" + +diff --git a/tests/data/tavern/api_version.yaml b/tests/data/tavern/api_version.yaml +index ca11906cc9..8e81493353 100755 +--- a/tests/data/tavern/api_version.yaml ++++ b/tests/data/tavern/api_version.yaml +@@ -35,7 +35,7 @@ stages: + content-type: !re_match "text/plain" + content-type: !re_search "charset=(UTF|utf)-8" + verify_response_with: +- function: tavern.testutils.helpers:validate_regex ++ function: tavern.helpers:validate_regex + extra_kwargs: + expression: "{SAB_VERSION}" + +@@ -53,6 +53,6 @@ stages: + content-type: !re_match "text/xml" + content-type: !re_search "charset=(UTF|utf)-8" + verify_response_with: +- function: tavern.testutils.helpers:validate_regex ++ function: tavern.helpers:validate_regex + extra_kwargs: + expression: '<\?xml version="1.0" encoding="UTF-8" \?>\r?\n?<version>{SAB_VERSION}</version>' +diff --git a/tests/requirements.txt b/tests/requirements.txt +index ea2fe6c403..60c160fe40 100644 +--- a/tests/requirements.txt ++++ b/tests/requirements.txt +@@ -9,7 +9,7 @@ pytest-httpbin + pytest-httpserver + flaky + xmltodict +-tavern<2.0.0 # tavalidate does not support tavern 2.0.0+ ++tavern>=2.0.0 + tavalidate + importlib_metadata + lxml |