def test_create_change_setting_and_delete( self): # Just check there aren't any errors site.add("New", "https://test.com/", site.build_settings()) site.change_settings( "New", site.build_settings("POST", None, '{}', None, [204, 205], 'Just test', site.build_fail_actions(False, False))) site.delete("New")
def continue_f(self): if len(self.name.text()) > 3: if self.name.text() not in site.get_sites_dict().keys(): if len(self.url.text()) > 2: log.debug( 'Opening SiteSettings window for just created site \'' + self.name.text() + '\'') site.add(self.name.text(), self.url.text(), site.build_settings()) self.hide() else: QtWidgets.QMessageBox.information(self, 'Message', 'Name must be unique', QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Ok) else: QtWidgets.QMessageBox.information( self, 'Message', 'Name must be at least 4 characters long', QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Ok)
def test_create_rename_to_same_name_and_delete(self): site.add("New", "https://test.com/", site.build_settings()) self.assertRaises(NameError, site.rename, "New", "New") site.delete("New")
def test_create_rename_and_delete( self): # Just check there aren't any errors site.add("New", "https://test.com/", site.build_settings()) site.rename("New", "New2") site.delete("New2")
def test_double_add_and_delete_website(self): site.add("New", "https://test.com/", site.build_settings()) self.assertRaises(NameError, site.add, "New", "https://test.com/", site.build_settings()) site.delete("New")
def test_add_and_delete_website_favourite( self): # Just check there aren't any errors site.add("New", "https://test.com/", site.build_settings(), True) site.delete("New")