def site_delete(self): log.info('Deleting site \'' + self.site + '\'') name = self.site if QtWidgets.QMessageBox().question( self, 'Really', 'Are you sure to delete ' + name + '?', QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No, QtWidgets.QMessageBox.No) == QtWidgets.QMessageBox.Yes: site.delete(name)
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 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")