Beispiel #1
0
def connection():
    create_db('_test_db')
    connection = db_connection('_test_db')
    setup_db(connection)
    yield connection

    teardown_db(connection)
    connection.close()
Beispiel #2
0
def connection():
    create_db(TEST_DB_NAME)
    connection = db_connection(TEST_DB_NAME)
    setup_db(connection)
    yield connection

    teardown_db(connection)
    connection.close()
Beispiel #3
0
def connection():
    create_db('_test_db')
    connection = db_connection('_test_db')
    setup_db(connection)
    yield connection

    teardown_db(connection)
    connection.close()
Beispiel #4
0
def main():
    dbutils.create_db("database.db")

    name = input("Enter the name to add to the database: ")
    phone = input(
        "Enter the phone number (without dashes) to add to the database: ")

    dbutils.insert("database.db", name, phone)
def main():
    # Create Database if it doesn't exist
    if not os.path.exists(dbFile):
        dbutils.create_db(dbFile)
    # Show the main GUI
    doMenu()