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))
def test_06(self): """ Test Case 06: Test :py:meth:`magrathea.utils.file.File._check_file_exists` with an existing file (this file). Test is passed if return value is True. """ self.assertTrue(File._check_file_exists(__file__))
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))
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))
def test_11(self): """ Test Case 11: Test :py:meth:`magrathea.utils.file.File._check_dir_exists` with an existing fs object not being a directory. Test is passed if return value is False. """ self.assertFalse(File._check_dir_exists(__file__))
def test_10(self): """ Test Case 10: Test :py:meth:`magrathea.utils.file.File._check_dir_exists` with a non-existing directory. Test is passed if return value is False. """ self.assertFalse(File._check_dir_exists('/foobarstuffdirdoesntexist'))
def test_09(self): """ Test Case 09: Test :py:meth:`magrathea.utils.file.File._check_dir_exists` with an existing directory (this file's parent). Test is passed if return value is True. """ self.assertTrue(File._check_dir_exists(os.path.dirname(__file__)))
def test_08(self): """ Test Case 08: Test :py:meth:`magrathea.utils.file.File._check_file_exists` with an existing fs object not being a file. Test is passed if return value is False. """ self.assertFalse(File._check_file_exists('/usr/sbin'))
def test_07(self): """ Test Case 07: Test :py:meth:`magrathea.utils.file.File._check_file_exists` with a non-existing file. Test is passed if return value is True. """ self.assertFalse(File._check_file_exists('/foobarstuffdirdoesntexist'))