Esempio n. 1
0
    jp_tests = [  # {{{
            (  # Adult filtering test
             {'identifiers':{'isbn':'4799500066'}},
             [title_test(u'Bitch Trap'),]
            ),

            (  # isbn -> title, authors
                {'identifiers':{'isbn': '9784101302720'}},
                [title_test(u'精霊の守り人',
                    exact=True), authors_test([u'上橋 菜穂子'])
                 ]
            ),
            (  # title, authors -> isbn (will use Shift_JIS encoding in query.)
                {'title': u'考えない練習',
                 'authors': [u'小池 龍之介']},
                [isbn_test('9784093881067'), ]
            ),
    ]  # }}}

    br_tests = [  # {{{
            (
                {'title':'Guerra dos Tronos'},
                [title_test('A Guerra dos Tronos - As Crônicas de Gelo e Fogo',
                    exact=True), authors_test(['George R. R. Martin'])
                 ]

            ),
    ]  # }}}

    def do_test(domain, start=0, stop=None):
        tests = globals().get(domain+'_tests')
Esempio n. 2
0
                {'identifiers':{}, 'title':u'Der Himmel Kennt Keine Gunstlinge',
                    'authors':[u'Erich Maria Remarque']},
                [title_test(u'Der Himmel Kennt Keine Gunstlinge', exact=True),
                 authors_test([u'Erich Maria Remarque'])]
             ),
             (
                {'identifiers':{}, 'title':u'Метро 2033',
                    'authors':[u'Дмитрий Глуховский']},
                [title_test(u'Метро 2033', exact=False)]
             ),
             (
                {'identifiers':{'isbn': '9785170727209'}, 'title':u'Метро 2033',
                    'authors':[u'Дмитрий Глуховский']},
                [title_test(u'Метро 2033', exact=True),
                    authors_test([u'Дмитрий Глуховский']),
                    isbn_test('9785170727209')]
             ),
             (
                {'identifiers':{'isbn': '5-699-13613-4'}, 'title':u'Метро 2033',
                    'authors':[u'Дмитрий Глуховский']},
                [title_test(u'Метро 2033', exact=True),
                 authors_test([u'Дмитрий Глуховский'])]
             ),
             (
                {'identifiers':{}, 'title':u'Метро',
                    'authors':[u'Глуховский']},
                [title_test(u'Метро', exact=False)]
             ),
    ])
# }}}
Esempio n. 3
0
    es_tests = [  # {{{
        (
            {"identifiers": {"isbn": "8483460831"}},
            [title_test("Tiempos Interesantes", exact=True), authors_test(["Terry Pratchett"])],
        )
    ]  # }}}

    jp_tests = [  # {{{
        ({"identifiers": {"isbn": "4799500066"}}, [title_test("Bitch Trap")]),  # Adult filtering test
        (  # isbn -> title, authors
            {"identifiers": {"isbn": "9784101302720"}},
            [title_test("精霊の守り人", exact=True), authors_test(["上橋 菜穂子"])],
        ),
        (  # title, authors -> isbn (will use Shift_JIS encoding in query.)
            {"title": "考えない練習", "authors": ["小池 龍之介"]},
            [isbn_test("9784093881067")],
        ),
    ]  # }}}

    br_tests = [  # {{{
        (
            {"title": "Guerra dos Tronos"},
            [
                title_test("A Guerra dos Tronos - As Crônicas de Gelo e Fogo", exact=True),
                authors_test(["George R. R. Martin"]),
            ],
        )
    ]  # }}}

    nl_tests = [  # {{{
        (
Esempio n. 4
0
            #                 authors_test([u'В. П. Колесников', u'Г. В. Шатков'])]
            #            ),
            (
                {"identifiers": {"isbn": "9785916572629"}},
                [title_test("На все четыре стороны", exact=True), authors_test(["А. А. Гилл"])],
            ),
            (
                {"identifiers": {}, "title": "Der Himmel Kennt Keine Gunstlinge", "authors": ["Erich Maria Remarque"]},
                [title_test("Der Himmel Kennt Keine Gunstlinge", exact=True), authors_test(["Erich Maria Remarque"])],
            ),
            (
                {"identifiers": {}, "title": "Метро 2033", "authors": ["Дмитрий Глуховский"]},
                [title_test("Метро 2033", exact=False)],
            ),
            (
                {"identifiers": {"isbn": "9785170727209"}, "title": "Метро 2033", "authors": ["Дмитрий Глуховский"]},
                [
                    title_test("Метро 2033", exact=True),
                    authors_test(["Дмитрий Глуховский"]),
                    isbn_test("9785170727209"),
                ],
            ),
            (
                {"identifiers": {"isbn": "5-699-13613-4"}, "title": "Метро 2033", "authors": ["Дмитрий Глуховский"]},
                [title_test("Метро 2033", exact=True), authors_test(["Дмитрий Глуховский"])],
            ),
            ({"identifiers": {}, "title": "Метро", "authors": ["Глуховский"]}, [title_test("Метро", exact=False)]),
        ],
    )
# }}}
Esempio n. 5
0
    jp_tests = [  # {{{
            (  # Adult filtering test
             {'identifiers':{'isbn':'4799500066'}},
             [title_test(u'Bitch Trap'),]
            ),

            (  # isbn -> title, authors
                {'identifiers':{'isbn': '9784101302720'}},
                [title_test(u'精霊の守り人',
                    exact=True), authors_test([u'上橋 菜穂子'])
                 ]
            ),
            (  # title, authors -> isbn (will use Shift_JIS encoding in query.)
                {'title': u'考えない練習',
                 'authors': [u'小池 龍之介']},
                [isbn_test('9784093881067'), ]
            ),
    ]  # }}}

    br_tests = [  # {{{
            (
                {'title':'Guerra dos Tronos'},
                [title_test('A Guerra dos Tronos - As Crônicas de Gelo e Fogo',
                    exact=True), authors_test(['George R. R. Martin'])
                 ]

            ),
    ]  # }}}

    def do_test(domain, start=0, stop=None):
        tests = globals().get(domain+'_tests')
Esempio n. 6
0
 ]),
 ({
     'identifiers': {},
     'title': u'Метро 2033',
     'authors': [u'Дмитрий Глуховский']
 }, [title_test(u'Метро 2033', exact=False)]),
 ({
     'identifiers': {
         'isbn': '9785170727209'
     },
     'title': u'Метро 2033',
     'authors': [u'Дмитрий Глуховский']
 }, [
     title_test(u'Метро 2033', exact=True),
     authors_test([u'Дмитрий Глуховский']),
     isbn_test('9785170727209')
 ]),
 ({
     'identifiers': {
         'isbn': '5-699-13613-4'
     },
     'title': u'Метро 2033',
     'authors': [u'Дмитрий Глуховский']
 }, [
     title_test(u'Метро 2033', exact=True),
     authors_test([u'Дмитрий Глуховский'])
 ]),
 ({
     'identifiers': {},
     'title': u'Метро',
     'authors': [u'Глуховский']