From b5f72c2b57dfa6cfc671d91a07833eeb04c9f2b6 Mon Sep 17 00:00:00 2001 From: Taka Date: Sun, 14 Feb 2021 20:13:52 +1100 Subject: [PATCH] Fixed a broken test when running against a remote server. --- vasl_templates/webapp/tests/test_scenario_search.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vasl_templates/webapp/tests/test_scenario_search.py b/vasl_templates/webapp/tests/test_scenario_search.py index 4537704..2f53501 100644 --- a/vasl_templates/webapp/tests/test_scenario_search.py +++ b/vasl_templates/webapp/tests/test_scenario_search.py @@ -1,7 +1,6 @@ """" Test scenario search. """ import os -import re import base64 import time @@ -665,7 +664,7 @@ def test_scenario_downloads( webapp, webdriver ): if btn: fgroup[ key ] = fixup( btn.get_attribute( "data-url" ) ) def fixup( val ): #pylint: disable=missing-docstring - val = re.sub( r"(localhost|127.0.0.1):\d+", "{LOCALHOST}", val ) + val = val.replace( webapp.base_url, "{WEBAPP-BASE-URL}" ) val = val.replace( "%7C", "|" ) return val @@ -676,7 +675,7 @@ def test_scenario_downloads( webapp, webdriver ): # check the downloads for a scenario that has some _do_scenario_search( "full", [1], webdriver ) assert unload_downloads() == [ { - "screenshot": "http://{LOCALHOST}/static/images/missing-image.png", + "screenshot": "{WEBAPP-BASE-URL}/static/images/missing-image.png", "timestamp": "November 14, 2023", "user": "dave", "vasl_setup": "http://test.com/dave:1700000000|vt_setup4.vsav",