Exemple #1
0
 def test_is_not_encfs_subprocess_failure(self, tmpdir):
     e = PyEncfs("--paranoia")
     assert e.create(tmpdir + "/e", tmpdir + "/d", "PASSWORD")
     with mock.patch("subprocess.run", side_effect=Exception("outch")):
         assert not e.is_encfs(tmpdir + "/e")
     assert e.umount(tmpdir + "/d")
Exemple #2
0
 def test_is_encfs(self, tmpdir):
     e = PyEncfs("--paranoia")
     assert e.create(tmpdir + "/e", tmpdir + "/d", "PASSWORD")
     assert e.is_encfs(tmpdir + "/e")
     assert e.umount(tmpdir + "/d")
Exemple #3
0
 def test_is_not_encfs(self, tmpdir):
     e = PyEncfs()
     assert e.create(tmpdir + "/e", tmpdir + "/d", "PASSWORD")
     assert not e.is_encfs(tmpdir + "/d")
     assert e.umount(tmpdir + "/d")