Skip to content

Commit 7e7241f

Browse files
committed
Fix warnings from tests
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 206d55d commit 7e7241f

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def get_uri(self):
441441
return 'mongodb://localhost:{port!s}'.format(port=self.port)
442442

443443

444-
@pytest.yield_fixture
444+
@pytest.fixture
445445
def mongodb_instance():
446446
tmp_db = MongoTemporaryInstance()
447447
yield tmp_db

tests/flows/test_account_linking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import responses
22
from werkzeug.test import Client
3-
from werkzeug.wrappers import BaseResponse
3+
from werkzeug.wrappers import Response
44

55
from satosa.proxy_server import make_app
66
from satosa.satosa_config import SATOSAConfig
@@ -15,7 +15,7 @@ def test_full_flow(self, satosa_config_dict, account_linking_module_config):
1515
satosa_config_dict["MICRO_SERVICES"].insert(0, account_linking_module_config)
1616

1717
# application
18-
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), BaseResponse)
18+
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), Response)
1919

2020
# incoming auth req
2121
http_resp = test_client.get("/{}/{}/request".format(satosa_config_dict["BACKEND_MODULES"][0]["name"],

tests/flows/test_consent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import responses
55
from werkzeug.test import Client
6-
from werkzeug.wrappers import BaseResponse
6+
from werkzeug.wrappers import Response
77

88
from satosa.proxy_server import make_app
99
from satosa.satosa_config import SATOSAConfig
@@ -18,7 +18,7 @@ def test_full_flow(self, satosa_config_dict, consent_module_config):
1818
satosa_config_dict["MICRO_SERVICES"].append(consent_module_config)
1919

2020
# application
21-
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), BaseResponse)
21+
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), Response)
2222

2323
# incoming auth req
2424
http_resp = test_client.get("/{}/{}/request".format(satosa_config_dict["BACKEND_MODULES"][0]["name"],

tests/flows/test_oidc-saml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from saml2 import BINDING_HTTP_REDIRECT
1010
from saml2.config import IdPConfig
1111
from werkzeug.test import Client
12-
from werkzeug.wrappers import BaseResponse
12+
from werkzeug.wrappers import Response
1313

1414
from satosa.metadata_creation.saml_metadata import create_entity_descriptors
1515
from satosa.proxy_server import make_app
@@ -60,7 +60,7 @@ def test_full_flow(self, satosa_config_dict, oidc_frontend_config, saml_backend_
6060
_, backend_metadata = create_entity_descriptors(SATOSAConfig(satosa_config_dict))
6161

6262
# application
63-
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), BaseResponse)
63+
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), Response)
6464

6565
# get frontend OP config info
6666
provider_config = json.loads(test_client.get("/.well-known/openid-configuration").data.decode("utf-8"))

tests/flows/test_saml-oidc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from saml2 import BINDING_HTTP_REDIRECT
66
from saml2.config import SPConfig
77
from werkzeug.test import Client
8-
from werkzeug.wrappers import BaseResponse
8+
from werkzeug.wrappers import Response
99

1010
from satosa.metadata_creation.saml_metadata import create_entity_descriptors
1111
from satosa.proxy_server import make_app
@@ -27,7 +27,7 @@ def run_test(self, satosa_config_dict, sp_conf, oidc_backend_config, frontend_co
2727
frontend_metadata, backend_metadata = create_entity_descriptors(SATOSAConfig(satosa_config_dict))
2828

2929
# application
30-
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), BaseResponse)
30+
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), Response)
3131

3232
# config test SP
3333
frontend_metadata_str = str(frontend_metadata[frontend_config["name"]][0])

tests/flows/test_saml-saml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from saml2 import BINDING_HTTP_REDIRECT
44
from saml2.config import SPConfig, IdPConfig
55
from werkzeug.test import Client
6-
from werkzeug.wrappers import BaseResponse
6+
from werkzeug.wrappers import Response
77

88
from satosa.metadata_creation.saml_metadata import create_entity_descriptors
99
from satosa.proxy_server import make_app
@@ -23,7 +23,7 @@ def run_test(self, satosa_config_dict, sp_conf, idp_conf, saml_backend_config, f
2323
frontend_metadata, backend_metadata = create_entity_descriptors(SATOSAConfig(satosa_config_dict))
2424

2525
# application
26-
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), BaseResponse)
26+
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), Response)
2727

2828
# config test SP
2929
frontend_metadata_str = str(frontend_metadata[frontend_config["name"]][0])

tests/flows/test_wsgi_flow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55

66
from werkzeug.test import Client
7-
from werkzeug.wrappers import BaseResponse
7+
from werkzeug.wrappers import Response
88

99
from satosa.proxy_server import make_app
1010
from satosa.response import NotFound
@@ -21,7 +21,7 @@ def test_flow(self, satosa_config_dict):
2121
"""
2222
Performs the test.
2323
"""
24-
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), BaseResponse)
24+
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), Response)
2525

2626
# Make request to frontend
2727
resp = test_client.get('/{}/{}/request'.format("backend", "frontend"))
@@ -35,7 +35,7 @@ def test_flow(self, satosa_config_dict):
3535
assert resp.data.decode('utf-8') == "Auth response received, passed to test frontend"
3636

3737
def test_unknown_request_path(self, satosa_config_dict):
38-
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), BaseResponse)
38+
test_client = Client(make_app(SATOSAConfig(satosa_config_dict)), Response)
3939

4040
resp = test_client.get('/unknown')
4141
assert resp.status == NotFound._status

0 commit comments

Comments
 (0)