(cls)
| 18 | |
| 19 | @classmethod |
| 20 | def setUpClass(cls): |
| 21 | try: |
| 22 | # create the database objects to test upon |
| 23 | client = create_mssql_cli_client() |
| 24 | list(client.execute_query('CREATE DATABASE {0};'.format(cls.database))) |
| 25 | list(client.execute_query('CREATE TABLE {0} (a int, b varchar(25));' |
| 26 | .format(cls.table1))) |
| 27 | list(client.execute_query('CREATE TABLE {0} (x int, y varchar(25), z bit);' |
| 28 | .format(cls.table2))) |
| 29 | list(client.execute_query('CREATE VIEW {0} as SELECT a from {1};' |
| 30 | .format(cls.view, cls.table1))) |
| 31 | list(client.execute_query('CREATE SCHEMA {0};'.format(cls.schema))) |
| 32 | list(client.execute_query('CREATE INDEX {0} ON {1} (x);'.format(cls.index, cls.table2))) |
| 33 | list(client.execute_query('CREATE FUNCTION {0}() \ |
| 34 | RETURNS TABLE AS RETURN (select 1 as number);' |
| 35 | .format(cls.function))) |
| 36 | list(client.execute_query('CREATE LOGIN {0} WITH PASSWORD=\'yoloC123445!\'' |
| 37 | .format(cls.login))) |
| 38 | finally: |
| 39 | shutdown(client) |
| 40 | |
| 41 | @classmethod |
| 42 | def tearDownClass(cls): |
nothing calls this directly
no test coverage detected