示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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)