def test_notify_new_document(self): from lembrar import plugins entry_point = MagicMock() def fake_entry_points(group): return [entry_point] plugins.iter_entry_points = fake_entry_points plugins.notify_new_document('docid') assert [call.load(), call.load()(initial=False, docids=['docid' ])] == entry_point.mock_calls
def test_notify_new_document(self): from lembrar import plugins entry_point = MagicMock() def fake_entry_points(group): return [entry_point] plugins.iter_entry_points = fake_entry_points plugins.notify_new_document('docid') assert [call.load(), call.load()(initial=False, docids=['docid'])] == entry_point.mock_calls
def test_no_args(self, m_Simulator, m_Script, m_parse_args): commandline.main([]) self.checkCalls( m_parse_args, call([])) self.checkCalls( m_Simulator, call()) self.checkCalls( m_Script, call.load(m_parse_args().SOURCE), call.load().execute(m_Simulator()))