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

Method setUp

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

Source from the content-addressed store, hash-verified

2050 cls.cluster, server_settings=cls.get_server_settings())
2051
2052 def setUp(self):
2053 super().setUp()
2054
2055 self.cluster.reset_hba()
2056
2057 create_script = []
2058 create_script.append('CREATE ROLE ssl_user WITH LOGIN;')
2059 create_script.append('GRANT ALL ON SCHEMA public TO ssl_user;')
2060
2061 self._add_hba_entry()
2062
2063 # Put hba changes into effect
2064 self.cluster.reload()
2065
2066 create_script = '\n'.join(create_script)
2067 self.loop.run_until_complete(self.con.execute(create_script))
2068
2069 def tearDown(self):
2070 # Reset cluster's pg_hba.conf since we've meddled with it

Callers 1

setUpMethod · 0.45

Calls 4

_add_hba_entryMethod · 0.95
reloadMethod · 0.80
reset_hbaMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected