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")
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")
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")