def test_get_links(): soup = bs.to_soup(ex.LINKS) links = bs.get_links(soup, 'http://retrogames.com') assert links == ['http://retrogames.com', 'http://retrogames.com/games/elite', 'http://retrogames.com/games/commando'] # links = bs.get_links(soup) assert links == ['http://retrogames.com', '/games/elite', '/games/commando']
def test_get_links(): soup = bs.to_soup(ex.LINKS) links = bs.get_links(soup, 'http://retrogames.com') assert links == [ 'http://retrogames.com', 'http://retrogames.com/games/elite', 'http://retrogames.com/games/commando' ] # links = bs.get_links(soup) assert links == [ 'http://retrogames.com', '/games/elite', '/games/commando' ]
def test_make_links_absolute(): soup = bs.to_soup(ex.LINKS) soup = bs.make_links_absolute(soup, 'http://retrogames.com') # links = bs.get_links(soup) assert links == ['http://retrogames.com', 'http://retrogames.com/games/elite', 'http://retrogames.com/games/commando']
def test_make_links_absolute(): soup = bs.to_soup(ex.LINKS) soup = bs.make_links_absolute(soup, 'http://retrogames.com') # links = bs.get_links(soup) assert links == [ 'http://retrogames.com', 'http://retrogames.com/games/elite', 'http://retrogames.com/games/commando' ]