Merge "Arrange unit test codes according to tested code directory"
This commit is contained in:
commit
324a443806
@ -21,7 +21,7 @@ import yaml
|
||||
def _get_template(name):
|
||||
filename = os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
"../vm/infra_drivers/openstack/data/", name)
|
||||
"../vnfm/infra_drivers/openstack/data/", name)
|
||||
f = codecs.open(filename, encoding='utf-8', errors='strict')
|
||||
return f.read()
|
||||
|
||||
|
@ -48,7 +48,7 @@ def dummy_get_vim(*args, **kwargs):
|
||||
|
||||
def _get_template(name):
|
||||
filename = os.path.abspath(os.path.join(os.path.dirname(__file__),
|
||||
'../../../etc/samples/' + str(name)))
|
||||
'../../etc/samples/' + str(name)))
|
||||
f = codecs.open(filename, encoding='utf-8', errors='strict')
|
||||
return f.read()
|
||||
|
@ -33,7 +33,7 @@ class TestSamples(testtools.TestCase):
|
||||
def _get_list_of_sample(self, tosca_files):
|
||||
if tosca_files:
|
||||
base_path = (os.path.dirname(os.path.abspath(__file__)) +
|
||||
'/../../../../samples/tosca-templates/vnfd/')
|
||||
'/../../../samples/tosca-templates/vnfd/')
|
||||
if isinstance(tosca_files, list):
|
||||
list_of_samples = []
|
||||
for tosca_file in tosca_files:
|
Loading…
Reference in New Issue
Block a user