def _fix_clean_db(request, settings_session): # loop fixture has function scope so can't be used here. from atoolbox.db import prepare_database loop = asyncio.new_event_loop() loop.run_until_complete(prepare_database(settings_session, True)) teardown_test_loop(loop)
def _fix_clean_db(request, settings_session): # loop fixture has function scope so can't be used here. loop = asyncio.new_event_loop() loop.run_until_complete( prepare_database(settings_session, not request.config.getoption('--reuse-db'))) teardown_test_loop(loop)
def function1698(): '\n a test client, called multiple times, should\n not attempt to close the server again.\n ' var1555 = setup_test_loop() var2252 = function2617() var65 = _TestClient(var2252, loop=var1555) var1555.run_until_complete(var65.close()) var1555.run_until_complete(var65.close()) teardown_test_loop(var1555)
def test_aiohttp_client_close_is_idempotent(): """ a test client, called multiple times, should not attempt to close the server again. """ loop = setup_test_loop() app = _create_example_app() client = _TestClient(_TestServer(app, loop=loop), loop=loop) loop.run_until_complete(client.close()) loop.run_until_complete(client.close()) teardown_test_loop(loop)
def test_test_client_close_is_idempotent(): """ a test client, called multiple times, should not attempt to close the loop again. """ loop = setup_test_loop() app = _create_example_app(loop) client = _TestClient(app) client.close() teardown_test_loop(loop) client.close()
def test_test_client_close_is_idempotent(): """ a test client, called multiple times, should not attempt to close the loop again. """ loop = setup_test_loop() app = _create_example_app(loop) client = TestClient(app) client.close() teardown_test_loop(loop) client.close()
def tearDown(self): from aiohttp.test_utils import teardown_test_loop self.loop.run_until_complete(self.tearDownAsync()) teardown_test_loop(self.loop)
def tearDown(self): self.loop.run_until_complete(self.as_class.graceful_cancel()) teardown_test_loop(self.loop)
def tearDown(self): self.loop.run_until_complete(self.client.close()) teardown_test_loop(self.loop)
def tearDown(self): Post.delete().execute() self.loop.run_until_complete(self.manager.manager.close()) teardown_test_loop(self.loop)
def tearDown(self): self.loop.run_until_complete(self.tearDownAsync()) teardown_test_loop(self.loop)