示例#1
0
def test_random_title():
    text = main.download()
    promises = main.extract_requests(text)
    titles = main.extract_titles(promises) 
    randomtitle = main.random_title(titles)

    assert type(randomtitle) == str
    assert len(randomtitle) > 0  
示例#2
0
def test_extract_request():
    text = main.download()
    promises = main.extract_requests(text)
    assert len(promises) == 174
示例#3
0
def test_download_sanity():
    assert main.download() is not None
示例#4
0
def test_extract_titles():
    text = main.download()
    promises = main.extract_requests(text)
    titles = main.extract_titles(promises) 

    assert titles[0] == title0
示例#5
0
def test_download_size():
    assert len(main.download()) == 135131