コード例 #1
0
    def setUp(self):
        """
        Record the current state of read-only mode and then ensure that it
        is enabled.

        """

        self.read_only_was_disabled = not read_only_mode
        if not read_only_mode:
            read_only_mode.enable()

        self.assertTrue(read_only_mode)
コード例 #2
0
ファイル: tests.py プロジェクト: apnarm/django-readwrite
    def setUp(self):
        """
        Record the current state of read-only mode and then ensure that it
        is enabled.

        """

        self.read_only_was_disabled = not read_only_mode
        if not read_only_mode:
            read_only_mode.enable()

        self.assertTrue(read_only_mode)
コード例 #3
0
 def enable(self):
     read_only_mode.enable()
     self.status()