def _load_fixtures(self):
self.fixtures = {}<EOL>for json_file in os.listdir(FIXTURES_DIR):<EOL><INDENT>if not json_file.endswith('<STR_LIT>'):<EOL><INDENT>continue<EOL><DEDENT>with open(FIXTURES_DIR + '<STR_LIT:/>' + json_file) as f:<EOL><INDENT>raw = f.read()<EOL><DEDENT>data = json.loads(raw)<EOL>fixture_url = json_file.replace('<STR_LIT:_>', '<STR_LIT:/>')[:-<NUM_LIT:5>]<EOL>self.fixtures[fixture_url] = data<EOL>if '<STR_LIT>' in data:<EOL><INDENT>for obj in data['<STR_LIT:data>']:<EOL><INDENT>if '<STR_LIT:id>' in obj: <EOL><INDENT>self.fixtures[fixture_url + '<STR_LIT:/>' + str(obj['<STR_LIT:id>'])] = obj<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Handles loading JSON files and parsing them into responses.  Also splits
returned lists into individual models that may be returned on their own.