Codebase list python-faraday / 9cdc78b
Fix for pytest 6 Sophie Brun 3 years ago
3 changed file(s) with 26 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
0 From: Sophie Brun <[email protected]>
1 Date: Wed, 10 Feb 2021 15:00:49 +0100
2 Subject: Fix for pytest 6
3
4 pytest.PytestDeprecationWarning: Passing arguments to pytest.fixture()
5 as positional arguments is deprecated - pass them as a keyword argument
6 instead.
7 ---
8 tests/test_api_preferences.py | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11 diff --git a/tests/test_api_preferences.py b/tests/test_api_preferences.py
12 index 4fb4654..3158911 100644
13 --- a/tests/test_api_preferences.py
14 +++ b/tests/test_api_preferences.py
15 @@ -5,7 +5,7 @@ from tests.factories import UserFactory
16 from faraday.server.models import User
17 from faraday.server.api.modules.preferences import PreferencesView
18
19 -pytest.fixture('logged_user')
20 +pytest.fixture(params=['logged_user'])
21 class TestPreferences(GenericAPITest):
22 model = User
23 factory = UserFactory
33 Remove-failing-tests.patch
44 fix-flask-security-requirement.patch
55 Use-local-flask-security.patch
6 Fix-for-pytest-6.patch
00 #!/usr/bin/make -f
11
22 #export DH_VERBOSE = 1
3 export PYBUILD_BEFORE_TEST=cp -r debian/python-modules/* $(CURDIR)/.pybuild/cpython3_3.9/build/
4 export PYBUILD_AFTER_TEST=rm -rf $(CURDIR)/.pybuild/cpython3_3.9/build/flask_security
53 export PYBUILD_BEFORE_TEST=cp -r debian/python-modules/* $(CURDIR)/.pybuild/cpython3_3.9/build/faraday
64 export PYBUILD_AFTER_TEST=rm -rf $(CURDIR)/.pybuild/cpython3_3.9/build/faraday/flask_security
7 export PYBUILD_TEST_ARGS="-k-TestGetExploits -k-test_update_command -k-test_start_and_kill_faraday_server-k-test_create_agent_without_name_fails -k-test_create_agent_invalid_payload -k-test_vuln_filter_exception -k-test_vuln_restless_sort_by_ -k-test_vuln_web_filter_exception -k-test_filter_by_creator_command_id -k-test_openapi_format"
5 export PYBUILD_TEST_ARGS=-k "not TestGetExploits and not test_update_command and not test_start_and_kill_faraday_server and not test_create_agent_without_name_fails and not test_create_agent_invalid_payload and not test_vuln_filter_exception and not test_vuln_restless_sort_by_ and not test_vuln_web_filter_exception and not test_filter_by_creator_command_id and not test_openapi_format"
86
97 %:
108 dh $@ --with python3,sphinxdoc --buildsystem=pybuild