Esempio n. 1
0
 def loadTypesXML(self):
     self.clearModMenu()
     fname = windows.openFile("xml")
     if fname != "":
         if windows.askOverwrite():
             windows.writeTypesToDatabase(fname)
     self.fillModMenu()
Esempio n. 2
0
 def createTest(self):
     if self.v.get() == "create":
         self.passParams()
         self.createDatabase()
         windows.connectionSuccess(self.window)
         if self.typesDir.get() != "":
             windows.writeTypesToDatabase(self.typesDir.get())
     else:
         self.testDB()
Esempio n. 3
0
def creating_subTypesTest(dirToTypes, database):
    try:
        createDB(database)
        dao.setColumnNames()
        print(dao.getCoulumNames())
        print("columns:", dao.columns)
        windows.writeTypesToDatabase(dirToTypes)
    finally:
        dao.drop_selected_DB(database)
Esempio n. 4
0
def testDaoGetItems(database, dirToTypes):
    try:
        createDB(database)
        sleep(0.05)
        windows.writeTypesToDatabase(dirToTypes)
        cursor = connection(database).cursor()
        cursor.execute("SELECT name from items")
        sleep(0.05)
        print(cursor.fetchall())
    finally:
        pass