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

Method setUp

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

Source from the content-addressed store, hash-verified

1816 cls.cluster, server_settings=cls.get_server_settings())
1817
1818 def setUp(self):
1819 super().setUp()
1820
1821 self.cluster.reset_hba()
1822
1823 create_script = []
1824 create_script.append('CREATE ROLE ssl_user WITH LOGIN;')
1825 create_script.append('GRANT ALL ON SCHEMA public TO ssl_user;')
1826
1827 self._add_hba_entry()
1828
1829 # Put hba changes into effect
1830 self.cluster.reload()
1831
1832 create_script = '\n'.join(create_script)
1833 self.loop.run_until_complete(self.con.execute(create_script))
1834
1835 def tearDown(self):
1836 # 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