MCPcopy Create free account
hub / github.com/dbcli/mssql-cli / tearDownClass

Method tearDownClass

tests/test_special.py:42–55  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

40
41 @classmethod
42 def tearDownClass(cls):
43 try:
44 # delete the database objects created
45 client = create_mssql_cli_client()
46 list(client.execute_query('DROP DATABASE {0};'.format(cls.database)))
47 list(client.execute_query('DROP INDEX {0} ON {1};'.format(cls.index, cls.table2)))
48 list(client.execute_query('DROP TABLE {0};'.format(cls.table1)))
49 list(client.execute_query('DROP TABLE {0};'.format(cls.table2)))
50 list(client.execute_query('DROP VIEW {0};'.format(cls.view)))
51 list(client.execute_query('DROP SCHEMA {0};'.format(cls.schema)))
52 list(client.execute_query('DROP FUNCTION {0}'.format(cls.function)))
53 list(client.execute_query('DROP LOGIN {0}'.format(cls.login)))
54 finally:
55 shutdown(client)
56
57 def test_list_tables_command(self):
58 self.command('\\lt', self.table1, min_rows_expected=2, rows_expected_pattern_query=1,

Callers

nothing calls this directly

Calls 4

create_mssql_cli_clientFunction · 0.90
shutdownFunction · 0.90
execute_queryMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected