Exemple #1
0
 def createRepository(self):
     dialog = addRepositoryDialog()
     if not dialog.exec_():
         return
     name = dialog.ui.nameInput.text()
     location = dialog.ui.locationInput.text()
     location = location.strip().replace("file://", "").replace("%20", " ")
     monitored = dialog.ui.monitoredInput.isChecked()
     managed = dialog.ui.managedInput.isChecked()
     libmgr.createRepository(name, location, monitored=monitored, managed=managed)
Exemple #2
0
    def setUp(self):
        try:
            SimpleLibraryTest.setUp(self)
            self.repository = libmgr.createRepository("Jonathan Main", songLibrary, managed=True, monitored=True)

        except DBConflictError:
            self.repository = (
                self.sqlaSession.query(libmgr.Repository).filter(libmgr.Repository.name == "Jonathan Main").one()
            )