예제 #1
0
    def test_04(self):
        """
        Test Case 04:
        Test :py:meth:`magrathea.utils.file.File._check_access` with a non existing path.

        Test is passed if return value is False.
        """
        self.assertFalse(File._check_access('/foobarstuffdirdoesntexist', os.R_OK))
예제 #2
0
    def test_05(self):
        """
        Test Case 05:
        Test :py:meth:`magrathea.utils.file.File._check_access` with an existing, but forbidden path.

        Test is passed if return value is False.
        """
        self.assertFalse(File._check_access('/usr/sbin', os.W_OK))
예제 #3
0
    def test_03(self):
        """
        Test Case 03:
        Test :py:meth:`magrathea.utils.file.File._check_access` with an existing path (this file).

        Test is passed if return value is True.
        """
        self.assertTrue(File._check_access(__file__, os.R_OK))