def test_check_command_blablablub(self, caplog): e = PyEncfs("--paranoia") assert not e._check_command("blablablub123lkj") self.assert_logging(1, "ERROR", caplog)
def test_check_command_which_failure(self): e = PyEncfs("--paranoia") with mock.patch("subprocess.run", side_effect=Exception("outch")): assert not e._check_command("ls")
def test_check_command_ls(self): e = PyEncfs("--paranoia") assert e._check_command("ls")
def test_check_command_ls(self): e = PyEncfs() assert e._check_command("ls")