def before_scenario(context, senario): context.resources = { 'namespace': {}, 'collection': {}, 'document': {}, } context.system_auth = [] context.ignored_auth = [] for v in EphemeralBackend._cls_cache.values(): v.clear() aiohttpretty.clear() context.mocks = {} context.patches = {} context.manager = NamespaceManager()
def pytest_runtest_setup(item): marker = item.get_marker('aiohttpretty') if marker is not None: aiohttpretty.clear() aiohttpretty.activate()
def pytest_runtest_setup(item): if 'aiohttpretty' in item.keywords: aiohttpretty.clear() aiohttpretty.activate()
def tearDown(self): aiohttpretty.clear()