Exemplo n.º 1
0
 def test_safe_bad_filename(self):
     resp = reusables.safe_filename(
         "<\">ThatsNotaFileName.\0ThatsASpaceShip^&*")
     assert not [x for x in ("\"", "?", "\0", "<", ">", "*") if x in resp
                 ], resp
     assert reusables.check_filename(resp)
Exemplo n.º 2
0
 def test_check_good_filename(self):
     resp = reusables.check_filename("safeFile.text")
     assert resp
Exemplo n.º 3
0
 def test_check_bad_filename(self):
     resp = reusables.check_filename("safeFile?.text")
     assert not resp
Exemplo n.º 4
0
 def test_safe_bad_filename(self):
     resp = reusables.safe_filename("<\">ThatsNotaFileName.\0ThatsASpaceShip^&*")
     assert not [x for x in ("\"", "?", "\0", "<", ">", "*") if x in resp], resp
     assert reusables.check_filename(resp)
Exemplo n.º 5
0
 def test_check_good_filename(self):
     resp = reusables.check_filename("safeFile.text")
     assert resp
Exemplo n.º 6
0
 def test_check_bad_filename(self):
     resp = reusables.check_filename("safeFile?.text")
     assert not resp