Fixed a test to work with Docker.

master v1.7
Pacman Ghost 3 years ago
parent 84c4757b51
commit b5d570ce7b
  1. 5
      vasl_templates/webapp/tests/control_tests_servicer.py
  2. 4
      vasl_templates/webapp/tests/test_aslrb2.py

@ -496,8 +496,9 @@ class ControlTestsServicer( BaseControlTestsServicer ): #pylint: disable=too-man
if request.HasField( val_type ):
key, val = request.key, getattr(request,val_type)
_logger.debug( "- Setting app config: %s = %s (%s)", key, str(val), type(val).__name__ )
if val == "{{TEMP_DIR}}":
val = self._temp_dir.name
if isinstance( val, str ):
val = val.replace( "{{TEMP_DIR}}", self._temp_dir.name ) \
.replace( "{{FIXTURES_DIR}}", _FIXTURES_DIR )
self._webapp.config[ key ] = val
return Empty()
raise RuntimeError( "Can't find app config key." )

@ -1,7 +1,5 @@
""" Test integration with asl-rulebook2. """
import os
from vasl_templates.webapp.tests.utils import init_webapp, find_child, find_children
from vasl_templates.webapp.tests.test_scenario_persistence import load_scenario
@ -12,7 +10,7 @@ def test_chapter_h( webapp, webdriver ):
# initialize
webapp.control_tests.set_app_config_val( "ASL_RULEBOOK2_BASE_URL",
os.path.join( os.path.dirname(__file__), "fixtures/asl-rulebook2/vo-note-targets.json" )
"{{FIXTURES_DIR}}/asl-rulebook2/vo-note-targets.json"
)
init_webapp( webapp, webdriver, scenario_persistence=1 )
base_url = "{}/asl-rulebook2/".format( webapp.base_url )

Loading…
Cancel
Save