Skip to content

Commit e27794f

Browse files
committed
DI-26927 reverted fixtures.py as its not necesary to change
1 parent 55cc324 commit e27794f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

test/unit/fixtures.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import re
44
import sys
55

6-
# Determine fixtures directory relative to this file to avoid relying on sys.path[0]
7-
FIXTURES_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "fixtures")
6+
FIXTURES_DIR = sys.path[0] + "/test/fixtures"
87

98
# This regex is useful for finding individual underscore characters,
109
# which is necessary to allow us to use underscores in URL paths.
@@ -22,12 +21,6 @@ def get_fixture(self, url):
2221
"""
2322
Returns the test fixture data loaded at the given URL
2423
"""
25-
# If the fixture isn't found, attempt to reload fixtures. This is
26-
# helpful in test runs where fixtures may be added after the
27-
# TestFixtures singleton was constructed.
28-
if url not in self.fixtures:
29-
self._load_fixtures()
30-
3124
return self.fixtures[url]
3225

3326
def _load_fixtures(self):
@@ -56,4 +49,4 @@ def _load_fixtures(self):
5649
# this is a paginated response
5750
for obj in data["data"]:
5851
if "id" in obj: # tags, obj-buckets don't have ids
59-
self.fixtures[fixture_url + "/" + str(obj["id"])] = obj
52+
self.fixtures[fixture_url + "/" + str(obj["id"])] = obj

0 commit comments

Comments
 (0)