Fix for pytest 6
Sophie Brun
3 years ago
|
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
|
3 | 3 |
Remove-failing-tests.patch
|
4 | 4 |
fix-flask-security-requirement.patch
|
5 | 5 |
Use-local-flask-security.patch
|
|
6 |
Fix-for-pytest-6.patch
|
0 | 0 |
#!/usr/bin/make -f
|
1 | 1 |
|
2 | 2 |
#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
|
5 | 3 |
export PYBUILD_BEFORE_TEST=cp -r debian/python-modules/* $(CURDIR)/.pybuild/cpython3_3.9/build/faraday
|
6 | 4 |
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"
|
8 | 6 |
|
9 | 7 |
%:
|
10 | 8 |
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
|