c.l.t.readonly : module documentation

Part of canonical.launchpad.tests

Helpers for creating and removing a read-only.txt in the root of our tree.
Function touch_read_only_file Create an empty file named read-only.txt under the root of the tree.
Function remove_read_only_file Remove the file named read-only.txt from the root of the tree.
def touch_read_only_file():
Create an empty file named read-only.txt under the root of the tree.

This function must not be called if a file with that name already exists.

def remove_read_only_file(assert_mode_switch=True):
Remove the file named read-only.txt from the root of the tree.

May also assert that the mode switch actually happened (i.e. not is_read_only()). This assertion has to be conditional because some tests will use this during the processing of a request, when a mode change can't happen (i.e. is_read_only() will still return True during that request's processing, even though the read-only.txt file has been removed).

API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.