def test_ls_ioerror(self, m_get_jobs, m_open): m_get_jobs.return_value = ["1", "2"] m_open.side_effect = IOError() with pytest.raises(IOError): ls.ls("some/archive/dir", True)
def test_ls_ioerror(self, m_get_jobs, m_file): m_get_jobs.return_value = ["1", "2"] m_file.side_effect = IOError() with pytest.raises(IOError): ls.ls("some/archive/dir", True)
def test_ls(self, m_get_jobs, m_safe_load_all): m_get_jobs.return_value = ["1", "2"] m_safe_load_all.return_value = [{"failure_reason": "reasons"}] ls.ls("some/archive/div", True)
def test_ls(self, m_get_jobs, m_file, m_safe_load_all): m_get_jobs.return_value = ["1", "2"] m_safe_load_all.return_value = [{"failure_reason": "reasons"}] ls.ls("some/archive/div", True)