Ensure that pack fixture paths are absolute
st2common.content.utils.get_relative_path_to_pack_file assumes
that a relative path is already relative to the pack dir.
So, make sure we are passing an absolute path to tests.
@@ -158,15 +158,15 @@ submodules.
def get_fixtures_base_path():
- return os.path.join(os.path.dirname(__file__), "fixtures")
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "fixtures"))
def get_fixtures_packs_base_path():
- return os.path.join(os.path.dirname(__file__), "fixtures/packs")
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "fixtures/packs"))
def get_resources_base_path():
- return os.path.join(os.path.dirname(__file__), "resources")
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), "resources"))
class FixturesLoader(object):
