コード例 #1
0
ファイル: query_test.py プロジェクト: hypothesis/h
    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
コード例 #2
0
ファイル: query_test.py プロジェクト: nlisgo/h
    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
コード例 #3
0
ファイル: query_test.py プロジェクト: st-fresh/h
    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
コード例 #4
0
ファイル: query_test.py プロジェクト: nlisgo/h
    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
コード例 #5
0
    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
コード例 #6
0
ファイル: query_test.py プロジェクト: mari-ja/h
    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
コード例 #7
0
ファイル: query_test.py プロジェクト: nlisgo/h
 def test_it_returns_empty_list_when_no_reply_ids_provided(self, db_session):
     _, result = fetch_annotations(db_session, [], [])
     assert result == []
コード例 #8
0
ファイル: query_test.py プロジェクト: mari-ja/h
 def test_it_returns_empty_list_when_no_reply_ids_provided(
         self, db_session):
     _, result = fetch_annotations(db_session, [], [])
     assert result == []