def test_it_returns_annotations_by_ids(self, db_session, factories): annotations = factories.Annotation.create_batch(3) ids = [a.id for a in annotations] result = fetch_annotations(db_session, ids) assert annotations == result
def test_it_returns_replies_by_ids(self, db_session, factories): replies = [factories.Annotation() for _ in xrange(3)] ids = [a.id for a in replies] _, result = fetch_annotations(db_session, [], ids) assert replies == result
def test_it_returns_annotations_by_ids(self, db_session, factories): annotations = [factories.Annotation() for _ in xrange(3)] ids = [a.id for a in annotations] result = fetch_annotations(db_session, ids) assert annotations == result
def test_it_returns_annotations_by_ids(self, db_session, factories): annotations = [factories.Annotation() for _ in xrange(3)] ids = [a.id for a in annotations] result, _ = fetch_annotations(db_session, ids, []) assert annotations == result
def test_it_returns_empty_list_when_no_reply_ids_provided(self, db_session): _, result = fetch_annotations(db_session, [], []) assert result == []
def test_it_returns_empty_list_when_no_reply_ids_provided( self, db_session): _, result = fetch_annotations(db_session, [], []) assert result == []