From a83923f8316103bb5643ebbdd7c71285da6d64a2 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 2 Jan 2020 12:11:10 +0800 Subject: [PATCH] moving some lines --- test/test_actionsmap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_actionsmap.py b/test/test_actionsmap.py index 87da3f35..b2601d15 100644 --- a/test/test_actionsmap.py +++ b/test/test_actionsmap.py @@ -244,15 +244,15 @@ def test_actions_map_import_error(mocker): amap = ActionsMap(ActionsMapParser) from moulinette.core import MoulinetteLock - translation = m18n.g("error_see_log") - expected_msg = translation.format() + mocker.patch.object(MoulinetteLock, '_is_son_of', return_value=False) mocker.patch("__builtin__.__import__", side_effect=ImportError) - mocker.patch.object(MoulinetteLock, '_is_son_of', return_value=False) with pytest.raises(MoulinetteError) as exception: amap.process({}, timeout=30, route=('GET', '/test-auth/none')) mocker.stopall() + translation = m18n.g("error_see_log") + expected_msg = translation.format() assert expected_msg in str(exception)