Part of canonical.launchpad.tests
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. |
This function must not be called if a file with that name already exists.
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).