MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / tearDown

Method tearDown

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

executeMethod · 0.45
tearDownMethod · 0.45

Tested by

no test coverage detected