Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
slapos
Commits
6316e7bb
Commit
6316e7bb
authored
Sep 20, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: fix test py2 compatibility
parent
0fad9a6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
slapos/test/recipe/test_switch_softwaretype.py
slapos/test/recipe/test_switch_softwaretype.py
+8
-3
No files found.
slapos/test/recipe/test_switch_softwaretype.py
View file @
6316e7bb
from
unittest.mock
import
MagicMock
import
unittest
from
slapos.recipe
import
switch_softwaretype
import
zc.buildout.testing
from
zc.buildout.buildout
import
MissingOption
,
MissingSection
from
mock
import
MagicMock
import
six
class
SwitchSoftwaretypeTest
(
unittest
.
TestCase
):
...
...
@@ -55,8 +57,11 @@ class SwitchSoftwaretypeTest(unittest.TestCase):
def
test_fallback_default
(
self
):
self
.
buildout
[
'slap-configuration'
][
'slap-software-type'
]
=
'RootSoftwareInstance'
if
six
.
PY2
:
# BBB
self
.
install_recipe
()
else
:
with
self
.
assertLogs
(
'switch-softwaretype'
,
level
=
'INFO'
)
as
lc
:
self
.
install_recipe
()
self
.
magick_sub_buildout
.
assert_called_once
()
self
.
assertIn
(
"The software_type 'RootSoftwareInstance' is deprecated"
,
lc
.
output
[
0
])
self
.
magick_sub_buildout
.
assert_called_once
()
self
.
assertIn
(
'instance-default.cfg'
,
self
.
magick_sub_buildout
.
call_args
.
args
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment