generalize get_fixture_name_and_path
It only worked for st2tests.fixtures.packs, but we need to
use it for other packs dirs as well.
@@ -170,9 +170,9 @@ def get_resources_base_path():
def get_fixture_name_and_path(fixture_file):
- pack_name = os.path.basename(os.path.dirname(fixture_file))
- pack_path = os.path.join(get_fixtures_packs_base_path(), pack_name)
- return pack_name, pack_path
+ fixture_path = os.path.dirname(fixture_file)
+ fixture_name = os.path.basename(fixture_path)
+ return fixture_name, fixture_path
class FixturesLoader(object):
