HomePhabricator

[bugfix] Check for {{bots}}/{{nobots}} in Page.text setter

Description

[bugfix] Check for {{bots}}/{{nobots}} in Page.text setter

This reverts fdfae7bb446a6 and moves early check into BasePage.text setter

  • revert fdfae7bb446a6 change for BasePage
  • check for botMayEdit in text setter first
  • cache botMayEdit result
  • added a test which assigns a text first without reading from api
  • update old tests with those steps:
    • call text deleter to remove "_raw_extracted_templates" cache
    • add template to "_text" attribute directly to bypass the botMayEdit check
    • make the test
    • clear the botMayEdit cache
  • patch unittest for "dry" option using a DryPage which prevents api call with botMayEdit method.

Bug: T267770
Change-Id: I986d3e2b3828266442cc9127dd792196d585b532