def register_uris(requirements, requests_mocker):
for fixture, objects in requirements.items():<EOL><INDENT>try:<EOL><INDENT>with open('<STR_LIT>'.format(fixture)) as file:<EOL><INDENT>data = json.loads(file.read())<EOL><DEDENT><DEDENT>except IOError:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(fixture))<EOL><DEDENT>if not isinstance(objects, list):<EOL><INDENT>raise TypeError('<STR_LIT>'.format(objects))<EOL><DEDENT>for obj_name in objects:<EOL><INDENT>obj = data.get(obj_name)<EOL>if obj is None:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(<EOL>obj_name.__repr__(),<EOL>fixture<EOL>))<EOL><DEDENT>method = requests_mock.ANY if obj['<STR_LIT>'] == '<STR_LIT>' else obj['<STR_LIT>']<EOL>if obj['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>url = requests_mock.ANY<EOL><DEDENT>else:<EOL><INDENT>url = get_institution_url(settings.BASE_URL) + '<STR_LIT>' + obj['<STR_LIT>']<EOL><DEDENT>try:<EOL><INDENT>requests_mocker.register_uri(<EOL>method,<EOL>url,<EOL>json=obj.get('<STR_LIT:data>'),<EOL>status_code=obj.get('<STR_LIT>', <NUM_LIT:200>),<EOL>headers=obj.get('<STR_LIT>', {})<EOL>)<EOL><DEDENT>except Exception as e:<EOL><INDENT>print(e)<EOL><DEDENT><DEDENT><DEDENT>
Given a list of required fixtures and an requests_mocker object,
register each fixture as a uri with the mocker.

:param base_url: str
:param requirements: dict
:param requests_mocker: requests_mock.mocker.Mocker