diff --git a/tests/test_allgo.py b/tests/test_allgo.py index d25a6914e3350ef42bfeceaf0c0bfe65918d1bb4..2362ffcf33097f9eeaa7667b2058e61f96ee9f4b 100644 --- a/tests/test_allgo.py +++ b/tests/test_allgo.py @@ -18,6 +18,23 @@ else: import allgo # I need to modify constant from allgo import * +# ================================================ +class TestStatusError: + + REF_MSG = "whatever, an error message." + + @pytest.fixture + def response(self): + m = Mock() + m.json.return_value = \ + { 'error': self.REF_MSG } + return m + + @pytest.mark.dbg + def test_msg(self, response): + err = StatusError(42, response) + assert self.REF_MSG == err.msg + # ================================================ @pytest.fixture(scope="module")