예제 #1
0
 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)
예제 #2
0
 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")
예제 #3
0
 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")
예제 #4
0
 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")
예제 #5
0
 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")
예제 #6
0
 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")