Пример #1
0
 def test_suppress_topic(self):
     """Suppress and restore a test topic."""
     # Setup
     topic = Topic(self.site, 'Topic:Sl4svodmrhzmpjjh')
     if topic.is_moderated:
         topic.restore('Pywikibot test')
     self.assertFalse(topic.is_moderated)
     # Suppress
     topic.suppress('Pywikibot test')
     self.assertTrue(topic.is_moderated)
     # Restore
     topic.restore('Pywikibot test')
     self.assertFalse(topic.is_moderated)
Пример #2
0
 def test_suppress_topic(self):
     """Suppress and restore a test topic."""
     # Setup
     topic = Topic(self.site, 'Topic:Sl4svodmrhzmpjjh')
     if topic.is_moderated:
         topic.restore('Pywikibot test')
     self.assertFalse(topic.is_moderated)
     # Suppress
     topic.suppress('Pywikibot test')
     self.assertTrue(topic.is_moderated)
     # Restore
     topic.restore('Pywikibot test')
     self.assertFalse(topic.is_moderated)
Пример #3
0
 def test_delete_topic(self):
     """Delete and restore a test topic."""
     # Setup
     topic = Topic(self.site, 'Topic:Sl4svodmrhzmpjjh')
     if topic.is_moderated:
         topic.restore('Pywikibot test')
     self.assertFalse(topic.is_moderated)
     # Delete
     topic.delete_mod('Pywikibot test')
     self.assertTrue(topic.is_moderated)
     # Restore
     topic.restore('Pywikibot test')
     self.assertFalse(topic.is_moderated)
Пример #4
0
 def test_delete_topic(self):
     """Delete and restore a test topic."""
     # Setup
     topic = Topic(self.site, 'Topic:Sl4svodmrhzmpjjh')
     if topic.is_moderated:
         topic.restore('Pywikibot test')
     self.assertFalse(topic.is_moderated)
     # Delete
     topic.delete_mod('Pywikibot test')
     self.assertTrue(topic.is_moderated)
     # Restore
     topic.restore('Pywikibot test')
     self.assertFalse(topic.is_moderated)