mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
moving some lines
This commit is contained in:
parent
064ff259bd
commit
a83923f831
1 changed files with 3 additions and 3 deletions
|
@ -244,15 +244,15 @@ def test_actions_map_import_error(mocker):
|
||||||
amap = ActionsMap(ActionsMapParser)
|
amap = ActionsMap(ActionsMapParser)
|
||||||
|
|
||||||
from moulinette.core import MoulinetteLock
|
from moulinette.core import MoulinetteLock
|
||||||
translation = m18n.g("error_see_log")
|
mocker.patch.object(MoulinetteLock, '_is_son_of', return_value=False)
|
||||||
expected_msg = translation.format()
|
|
||||||
|
|
||||||
mocker.patch("__builtin__.__import__", side_effect=ImportError)
|
mocker.patch("__builtin__.__import__", side_effect=ImportError)
|
||||||
mocker.patch.object(MoulinetteLock, '_is_son_of', return_value=False)
|
|
||||||
with pytest.raises(MoulinetteError) as exception:
|
with pytest.raises(MoulinetteError) as exception:
|
||||||
amap.process({}, timeout=30, route=('GET', '/test-auth/none'))
|
amap.process({}, timeout=30, route=('GET', '/test-auth/none'))
|
||||||
|
|
||||||
mocker.stopall()
|
mocker.stopall()
|
||||||
|
translation = m18n.g("error_see_log")
|
||||||
|
expected_msg = translation.format()
|
||||||
assert expected_msg in str(exception)
|
assert expected_msg in str(exception)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue