Last modified: 2014-10-16 01:29:58 UTC
There is no protect functionality in core yet! valhallasw@lisilwen:~/src/pwb/pywikibot-core$ python pwb.py protect -links:User:Valhallasw/linkpage -site:test -family:test Processing page User:Valhallasw Do you want to change the protection level of [[test:User:Valhallasw]]? ([Y]es, [N]o, [A]ll) Y Traceback (most recent call last): File "pwb.py", line 123, in <module> run_python_file(fn, argv, argvu) File "pwb.py", line 64, in run_python_file exec compile(source, filename, "exec") in main_mod.__dict__ File "scripts/protect.py", line 286, in <module> main() File "scripts/protect.py", line 280, in main bot.run() File "scripts/protect.py", line 137, in run move=self.move) File "/home/valhallasw/src/pwb/pywikibot-core/pywikibot/__init__.py", line 251, in wrapper return method(*__args, **__kw) File "/home/valhallasw/src/pwb/pywikibot-core/pywikibot/page.py", line 1417, in protect return self.site.protect(self, edit, move, reason) File "/home/valhallasw/src/pwb/pywikibot-core/pywikibot/site.py", line 230, in __getattr__ % (self.__class__.__name__, attr)) AttributeError: APISite instance has no attribute 'protect'
This has been implemented by GEOFBOT, but we should add some unit tests. Actual live testing would depend on a real test wiki, though...
(In reply to Merlijn van Deen from comment #1) > This has been implemented by GEOFBOT, but we should add some unit tests. > Actual live testing would depend on a real test wiki, though... Why isnt test.wikipedia good enough? Another option is WMF beta labs...?
The unit test framework has the ability to flag tests as 'write' tests, so they are not run by default.