Arrange unit test codes according to tested code directory
Change-Id: Iefd2e6c016f15d5760ea9cba872a09dada75ed11 Closes-bug: 1673694
This commit is contained in:
parent
d5623bef8b
commit
ac580099c1
|
@ -21,7 +21,7 @@ import yaml
|
||||||
def _get_template(name):
|
def _get_template(name):
|
||||||
filename = os.path.join(
|
filename = os.path.join(
|
||||||
os.path.dirname(os.path.abspath(__file__)),
|
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')
|
f = codecs.open(filename, encoding='utf-8', errors='strict')
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ def dummy_get_vim(*args, **kwargs):
|
||||||
|
|
||||||
def _get_template(name):
|
def _get_template(name):
|
||||||
filename = os.path.abspath(os.path.join(os.path.dirname(__file__),
|
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')
|
f = codecs.open(filename, encoding='utf-8', errors='strict')
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
|
@ -33,7 +33,7 @@ class TestSamples(testtools.TestCase):
|
||||||
def _get_list_of_sample(self, tosca_files):
|
def _get_list_of_sample(self, tosca_files):
|
||||||
if tosca_files:
|
if tosca_files:
|
||||||
base_path = (os.path.dirname(os.path.abspath(__file__)) +
|
base_path = (os.path.dirname(os.path.abspath(__file__)) +
|
||||||
'/../../../../samples/tosca-templates/vnfd/')
|
'/../../../samples/tosca-templates/vnfd/')
|
||||||
if isinstance(tosca_files, list):
|
if isinstance(tosca_files, list):
|
||||||
list_of_samples = []
|
list_of_samples = []
|
||||||
for tosca_file in tosca_files:
|
for tosca_file in tosca_files:
|
Loading…
Reference in New Issue