Esempio n. 1
0
def test_search():
    result = yt.search(key=youtube_key, part='snippet', q='test bitcoin')
    assert {'queryTime', 'param_part'}.issubset(result.columns)
Esempio n. 2
0
def test_empty_list_raises_error():
    with pytest.raises(ValueError):
        yt.search(key=youtube_key,
                  part='snippet',
                  q='testing bitcoin',
                  regionCode=[])
Esempio n. 3
0
def test_errors_returned_as_df():
    result = yt.search(key='wrong key', part='snippet', q='testing bitcoin')
Esempio n. 4
0
def test_with_zero_results_required():
    result = yt.search(key=youtube_key,
                       part='snippet',
                       q='testing bitcoin',
                       maxResults=0)