Beispiel #1
0
def connection():
    connection = Connection(password='******', db_name='test')
    connection.drop_db()
    connection.connect()

    yield connection

    connection.drop_db()
Beispiel #2
0
 def __init__(self, connection: Connection):
     self.connection = connection.connect()
     print('Connected to database Successfully')
     self.cursor = self.connection.cursor()