Split templates and tests in scenario tests
- Added subdirectory "templates" for storing all templates used in
scenario tests.
- Added parameter sub_dir for method _load_template.
- Inline template was moved in templates directory from
test_neutron_autoscaling.
Change-Id: I1acaf1ccc1466cf7ffc2e004eff486f49f4b5928
diff --git a/common/test.py b/common/test.py
index 2c09dcb..7b17d57 100644
--- a/common/test.py
+++ b/common/test.py
@@ -179,9 +179,10 @@
LOG.debug('Console output for %s', server.id)
LOG.debug(server.get_console_output())
- def _load_template(self, base_file, file_name):
+ def _load_template(self, base_file, file_name, sub_dir=None):
+ sub_dir = sub_dir or ''
filepath = os.path.join(os.path.dirname(os.path.realpath(base_file)),
- file_name)
+ sub_dir, file_name)
with open(filepath) as f:
return f.read()