예제 #1
0
def test_payload_integrity():
    pages = NHentai().get_pages()

    doujins = pages.get('doujins', [])

    for doujin in doujins:
        assert doujin.get('id') != None
        assert doujin.get('title') != None
        assert doujin.get('lang') != None
        assert doujin.get('cover') != None
        assert doujin.get('data-tags') != None
예제 #2
0
def test_case05():
    search = NHentai().search('320066')
    assert search is not None
예제 #3
0
def test_case04():
    search = NHentai().search('320253')
    assert search is not None
예제 #4
0
def test_case03():
    search = NHentai().search('naruto')
    assert len(search.get('doujins')) > 0
예제 #5
0
def test_case02():
    search = NHentai().search('658468468')
    assert len(search.get('doujins')) == 0
예제 #6
0
def test_case01():
    search = NHentai().search('320165')
    assert search is not None
예제 #7
0
def test_case07():
    doujin = NHentai().get_random()
    assert doujin is not None
예제 #8
0
def test_user_payload_integrity():
    user = NHentai().get_user_page('3438840', 'kenzinho_boca_de_veludo')

    assert user.get('uid') != None
    assert user.get('username') != None
    assert user.get('since') != None
예제 #9
0
def test_case01():
    doujin = NHentai()._get_doujin('320165')
    assert doujin is not None
예제 #10
0
def test_case07():
    doujin = NHentai()._get_doujin('full color')
    assert doujin is None
예제 #11
0
def test_case06():
    doujin = NHentai()._get_doujin('320290')
    assert doujin is not None
예제 #12
0
def test_case05():
    doujin = NHentai()._get_doujin('1212145487')
    assert doujin is None
예제 #13
0
def test_case04():
    doujin = NHentai()._get_doujin('0656654654')
    assert doujin is None
예제 #14
0
def test_case03():
    doujin = NHentai()._get_doujin('320067')
    assert doujin is not None
예제 #15
0
def test_case06():
    search = NHentai().search('auhdasudhudasd')
    assert len(search.get('doujins')) == 0
예제 #16
0
def test_case07():
    search = NHentai().search('full color')
    assert len(search.get('doujins')) > 0
예제 #17
0
def test_case01():
    doujin = NHentai().get_random()
    assert doujin.get('id') is not None
    assert doujin.get('title') is not None
    assert doujin.get('secondary_title') is not None
    assert doujin.get('tags') is not None
    assert doujin.get('artists') is not None
    assert doujin.get('languages') is not None
    assert doujin.get('categories') is not None
    assert doujin.get('pages') is not None
    assert doujin.get('images') is not None