Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
charm-ceph-proxy
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
cloud
charms
charm-ceph-proxy
Commits
5b701b51
Unverified
Commit
5b701b51
authored
6 years ago
by
Ryan Beisner
Browse files
Options
Downloads
Patches
Plain Diff
Fix lint in unit tests re: py3-first and py2 compat
Change-Id: Iaafe2c368390706a61976d3f13fd83d515ce4b3e
parent
06ac9046
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
unit_tests/test_ceph_broker.py
+1
-1
1 addition, 1 deletion
unit_tests/test_ceph_broker.py
unit_tests/test_utils.py
+1
-1
1 addition, 1 deletion
unit_tests/test_utils.py
with
2 additions
and
2 deletions
unit_tests/test_ceph_broker.py
+
1
−
1
View file @
5b701b51
...
...
@@ -28,7 +28,7 @@ class CephBrokerTestCase(unittest.TestCase):
def
test_process_requests_invalid_api_version
(
self
,
mock_log
):
req
=
json
.
dumps
({
'
api-version
'
:
2
,
'
ops
'
:
[]})
rc
=
ceph_broker
.
process_requests
(
req
)
print
"
Return:
%s
"
%
rc
print
(
"
Return:
{}
"
.
format
(
rc
))
self
.
assertEqual
(
json
.
loads
(
rc
),
{
'
exit-code
'
:
1
,
'
stderr
'
:
'
Missing or invalid api version (2)
'
})
...
...
This diff is collapsed.
Click to expand it.
unit_tests/test_utils.py
+
1
−
1
View file @
5b701b51
...
...
@@ -110,7 +110,7 @@ def patch_open():
Yields the mock for
"
open
"
and
"
file
"
, respectively.
'''
mock_open
=
MagicMock
(
spec
=
open
)
mock_file
=
MagicMock
(
spec
=
file
)
mock_file
=
MagicMock
(
spec
=
file
)
# noqa - transitional py2 py3
@contextmanager
def
stub_open
(
*
args
,
**
kwargs
):
...
...
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