Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mwclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WebU
shared
mwclient
Commits
6c38cf50
Commit
6c38cf50
authored
1 year ago
by
Dylann Cordel
Browse files
Options
Downloads
Patches
Plain Diff
disable mock args comparision for py<3.8
parent
3505e2eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_client.py
+10
-6
10 additions, 6 deletions
test/test_client.py
with
10 additions
and
6 deletions
test/test_client.py
+
10
−
6
View file @
6c38cf50
import
json
import
logging
import
sys
import
time
import
unittest
import
unittest.mock
as
mock
...
...
@@ -1214,8 +1215,9 @@ class TestUser(TestCase):
assert
'
remove
'
not
in
real_call_kwargs
assert
'
remove
'
not
in
mock_call_kwargs
assert
real_call_kwargs
==
mock_call_kwargs
assert
mock_call
.
args
==
call_args
[
1
].
args
if
sys
.
version_info
>=
(
3
,
8
,
0
):
assert
real_call_kwargs
==
mock_call_kwargs
assert
mock_call
.
args
==
call_args
[
1
].
args
assert
added
==
[
'
*
'
,
'
user
'
,
'
bureaucrat
'
,
'
sysop
'
]
...
...
@@ -1343,8 +1345,9 @@ class TestUser(TestCase):
assert
'
add
'
not
in
real_call_kwargs
assert
'
add
'
not
in
mock_call_kwargs
assert
real_call_kwargs
==
mock_call_kwargs
assert
mock_call
.
args
==
call_args
[
1
].
args
if
sys
.
version_info
>=
(
3
,
8
,
0
):
assert
real_call_kwargs
==
mock_call_kwargs
assert
mock_call
.
args
==
call_args
[
1
].
args
assert
removed
==
[
'
bureaucrat
'
,
'
sysop
'
]
...
...
@@ -1413,8 +1416,9 @@ class TestUser(TestCase):
remove_kwargs
=
set
(
real_call_kwargs
.
pop
(
'
remove
'
).
split
(
'
|
'
))
assert
remove_kwargs
==
set
(
mock_call_kwargs
.
pop
(
'
remove
'
).
split
(
'
|
'
))
assert
real_call_kwargs
==
mock_call_kwargs
assert
mock_call
.
args
==
call_args
[
2
].
args
if
sys
.
version_info
>=
(
3
,
8
,
0
):
assert
real_call_kwargs
==
mock_call_kwargs
assert
mock_call
.
args
==
call_args
[
2
].
args
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment