Ejemplo n.º 1
0
 def test_user_owner(self):
     os.chown(self.file, 1000, 1000)
     os.chmod(self.file, 0o660)
     self.assertFalse(only_root_write(self.file))
Ejemplo n.º 2
0
 def test_no_perms(self):
     os.chown(self.file, 1000, 1000)
     os.chmod(self.file, 0o000)
     self.assertTrue(only_root_write(self.file))
Ejemplo n.º 3
0
 def test_other_perms(self):
     os.chown(self.file, 0, 0)
     os.chmod(self.file, 0o666)
     self.assertFalse(only_root_write(self.file))
Ejemplo n.º 4
0
 def test_root_owner(self):
     os.chown(self.file, 0, 0)
     os.chmod(self.file, 0o660)
     self.assertTrue(only_root_write(self.file))