Skip to content

Commit 92a4d84

Browse files
author
Hang Le
committed
Skip: Update dependency test/pytest to v8 (merge commit)
Merge branch 'renovate/test-pytest-8.x' into 'main' * Fix mock attributes that were producing errors in unittests * Skip: Update dependency test/pytest to v8 See merge request https://gitlab.ci.csc.fi/sds-dev/sd-connect/swift-browser-ui/-/merge_requests/328 Approved-by: Hang Le <[email protected]> Co-authored-by: Joonatan Mäkinen <[email protected]> Co-authored-by: renovate-bot <[email protected]> Merged by Hang Le <[email protected]>
2 parents e497a3d + 5aebae6 commit 92a4d84

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test = [
5050
"mypy==1.10.0",
5151
"pytest-cov==4.1.0",
5252
"pytest-xdist==3.6.1",
53-
"pytest==7.4.4",
53+
"pytest==8.2.1",
5454
"tox==4.15.0",
5555
"setuptools==69.5.1",
5656
]

tests/request/test_bindings_bind.py

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def __init__(self, *args, **kwargs):
1515
self.resp = SimpleNamespace(
1616
**{"text": unittest.mock.AsyncMock(return_value="[]"), "status": 200}
1717
)
18+
self._testMethodName = "runTest"
19+
self._asyncioRunner = None
1820

1921
async def __aenter__(self, *args, **kwargs):
2022
"""."""

tests/sharing/test_bindings_bind.py

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def __init__(self, *args, **kwargs):
1919
"url": "http://example",
2020
}
2121
)
22+
self._testMethodName = "runTest"
23+
self._asyncioRunner = None
2224

2325
async def __aenter__(self, *args, **kwargs):
2426
"""."""
@@ -48,6 +50,8 @@ def __init__(self, *args, **kwargs):
4850
self.resp = SimpleNamespace(
4951
**{"status": 204, "url": "http://example", "reason": "reason"}
5052
)
53+
self._testMethodName = "runTest"
54+
self._asyncioRunner = None
5155

5256
async def __aenter__(self, *args, **kwargs):
5357
"""."""

tests/ui_unit/test_login.py

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def setUp(self):
3131
"swift_browser_ui.ui.login.aiohttp_session.get_session",
3232
self.aiohttp_session_get_session_oidc_mock,
3333
)
34+
self.p_new_sess = unittest.mock.patch(
35+
"swift_browser_ui.ui.login.aiohttp_session.new_session",
36+
unittest.mock.AsyncMock(return_value=self.session_return),
37+
)
3438

3539
async def test_oidc_start(self):
3640
"""Test oidc initial request."""

0 commit comments

Comments
 (0)