def test_can_write_attributes_to_connection(self): conn = Connection(self.connection) conn.dbname = 'BubblesInMyDrink' conn.server = 'mssql2014' conn.username = '******' conn.port = '1337' conn.initial_sql = "insert values (1, 'winning') into schema.table" conn.query_band = 'TableauReport=<workbookname>' self.assertEqual(conn.dbname, 'BubblesInMyDrink') self.assertEqual(conn.username, 'bob') self.assertEqual(conn.server, 'mssql2014') self.assertEqual(conn.port, '1337') self.assertEqual(conn.initial_sql, "insert values (1, 'winning') into schema.table") self.assertEqual(conn.query_band, 'TableauReport=<workbookname>')
def test_can_delete_query_band_from_connection(self): conn = Connection(self.connection) conn.query_band = None self.assertEqual(conn.query_band, None) self.assertIsNone(conn._connectionXML.get('query_band'))