From 0f02fdcce229d274bb2a29be6cf4f6395badc01b Mon Sep 17 00:00:00 2001 From: Andy Petralli <6251451+andresp@users.noreply.github.com> Date: Sun, 29 Oct 2023 10:34:30 -0700 Subject: [PATCH] Fixtestrunningbug (#26) * Fix minor test bug * Add unittests * Small refactor in test --- tests/test_technicolorxb7.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_technicolorxb7.py b/tests/test_technicolorxb7.py index 8f627d0..d51b305 100644 --- a/tests/test_technicolorxb7.py +++ b/tests/test_technicolorxb7.py @@ -20,14 +20,14 @@ def test_init(self): @responses.activate def test_succcessful_login(self): - responses.add(responses.POST, 'http://localhost:5000/check.jst', json={}, status=302) + responses.add(responses.POST, f'http://{config["Modem"]["Host"]}/check.jst', json={}, status=302) instance = ObservableModemFactory.get("TechnicolorXB7", config, logging.getLogger(None)) instance.login() @responses.activate def test_invalid_login(self): - responses.add(responses.POST, 'http://localhost:5000/check.jst', json={}, status=200) + responses.add(responses.POST, f'http://{config["Modem"]["Host"]}/check.jst', json={}, status=200) instance = ObservableModemFactory.get("TechnicolorXB7", config, logging.getLogger(None)) with pytest.raises(ModemCredentialsError):