def test_add_with_filename(self): rp = rnd_path() u = URL('http://www.w3af.com/abc/def.htm') r = HTTPRequest( u ) url_string = rp.modify_request( r ).url_object.url_string self.assertRegexpMatches(url_string, 'http://www.w3af.com/\w*/../abc/def.htm')
def test_add_path_to_base_url(self): rp = rnd_path() u = URL('http://www.w3af.com/') r = HTTPRequest( u ) url_string = rp.modify_request( r ).url_object.url_string self.assertRegexpMatches(url_string, 'http://www.w3af.com/\w*/../')