Exemple #1
0
 def test_check_fp_grp():
     assert FileOps.check_fp("LICENSE", FP.R_GRP)
     if sys.platform == "darwin":
         assert not FileOps.check_fp("LICENSE", FP.W_GRP)
     else:
         assert FileOps.check_fp("LICENSE", FP.W_GRP)
     assert not FileOps.check_fp("LICENSE", FP.X_GRP)
Exemple #2
0
 def test_check_fp_oth():
     assert FileOps.check_fp("LICENSE", FP.R_OTH)
     assert not FileOps.check_fp("LICENSE", FP.W_OTH)
     assert not FileOps.check_fp("LICENSE", FP.X_OTH)
Exemple #3
0
 def test_check_fp_usr():
     assert FileOps.check_fp("LICENSE", FP.R_USR | FP.W_USR)
     assert not FileOps.check_fp("LICENSE", FP.X_USR)
Exemple #4
0
 def test_is_root_negative():
     assert not FileOps.is_roots("LICENSE")
Exemple #5
0
 def test_is_root_positive():
     assert FileOps.is_roots("/etc")
Exemple #6
0
 def test_is_mine_negative():
     assert not FileOps.is_mine("/etc")
Exemple #7
0
 def test_is_mine_positive():
     assert FileOps.is_mine("LICENSE")