예제 #1
0
def test_elem_non_ads():
    match = abparser.lookup()
    for elem in elem_non_ads:
        # returns false in an array if found for individual elem
        assert match.match_elem("class", elem) == [False]
예제 #2
0
def test_non_ad_url():
    match = abparser.lookup()
    for url in url_non_ads:
        # returns none if no matches are found
        assert match.match_url(url) == None
예제 #3
0
def test_elem_ads():
    match= abparser.lookup()
    for elem in elem_ads:
        # returns true in an array if found for each individual elem
        assert match.match_elem("class", elem) == [True]
예제 #4
0
def test_ad_url():
    match = abparser.lookup()
    for url in url_ads:
        # returns true if match is found
        assert match.match_url(url) == True