MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / tearDown

Method tearDown

tests/test_connect.py:202–216  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

200 self.loop.run_until_complete(self.con.execute(create_script))
201
202 def tearDown(self):
203 # Reset cluster's pg_hba.conf since we've meddled with it
204 self.cluster.trust_local_connections()
205
206 drop_script = []
207 for username, method, _ in self.USERS:
208 if method == 'scram-sha-256' and self.server_version.major < 10:
209 continue
210
211 drop_script.append('DROP ROLE "{}";'.format(username))
212
213 drop_script = '\n'.join(drop_script)
214 self.loop.run_until_complete(self.con.execute(drop_script))
215
216 super().tearDown()
217
218
219class TestAuthentication(BaseTestAuthentication):

Callers

nothing calls this directly

Calls 3

executeMethod · 0.45
tearDownMethod · 0.45

Tested by

no test coverage detected