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