HomePhabricator

Add tests for Site.protect(), Page.protect(), fix page locks

Authored by Unicodesnowman.

Description

Add tests for Site.protect(), Page.protect(), fix page locks

This patch adds unit tests for protecting / unprotecting a page,
as well adding tests & fixing Site.lock_page(), Site.unlock_page()
Previously, page locking achieved no effect.

A bug, T78522 was encountered, causing the tests to fail for
now. The tests pass successfully if the bug is worked around by
only protecting a page once per execution.

The failing tests are marked as disabled, however in the meantime
there are alternate versions of the tests that works around the
bug.

You'll need sysop rights on test.wikipedia.org in order to run
the tests.

Bug: T59602
Change-Id: I8c0c91651b1c0083161d0e7c1d4cbf6ad144c669

Details

Committed
UnicodesnowmanDec 15 2014, 2:56 PM
Parents
rPWBC5cce877e9e76: Merge "New BasePage.content_model property"
Branches
Unknown
Tags
Unknown
ChangeId
I8c0c91651b1c0083161d0e7c1d4cbf6ad144c669