def assertFileMode(self, file_name, expected_mode):
    st = os.stat(file_name)
    actual_mode = stat.S_IMODE(st.st_mode)
    self.assertEqual(actual_mode, expected_mode)
Checks that the mode of a file is what we expect.
dataset/ETHPy150Open ganeti/ganeti/test/py/testutils/__init__.py/GanetiTestCase.assertFileMode