def get(self, url):
for matcher in self.url_matches:
if matcher[0].fullmatch(url):
return SimpleNamespace(data=json.load(
open(os.path.join(app.root_path, 'mock/fixtures/' + matcher[1]))
))
return SimpleNamespace(data={})
文章目录