コード例 #1
0
 def test_path_file(self):
     rs = reversed_slashes()
     
     u = URL('http://www.w3af.com/abc/def.htm')
     r = HTTPRequest( u )
     self.assertEqual(rs.modify_request( r ).url_object.url_string,
                      u'http://www.w3af.com/abc\\def.htm')
コード例 #2
0
    def test_no_modification(self):
        rs = reversed_slashes()

        u = URL('http://www.w3af.com/')
        r = HTTPRequest( u )
        self.assertEqual(rs.modify_request( r ).url_object.url_string,
                         u'http://www.w3af.com/')
コード例 #3
0
    def test_long_path_file(self):
        rs = reversed_slashes()

        u = URL('http://www.w3af.com/abc/123/def.htm')
        r = HTTPRequest(u)
        self.assertEqual(
            rs.modify_request(r).url_object.url_string,
            u'http://www.w3af.com/abc\\123\\def.htm')
        #
        #    The plugins should not modify the original request
        #
        self.assertEqual(u.url_string, u'http://www.w3af.com/abc/123/def.htm')
コード例 #4
0
 def test_long_path_file(self):
     rs = reversed_slashes()
     
     u = URL('http://www.w3af.com/abc/123/def.htm')
     r = HTTPRequest( u )
     self.assertEqual(rs.modify_request( r ).url_object.url_string,
                      u'http://www.w3af.com/abc\\123\\def.htm')
     #
     #    The plugins should not modify the original request
     #
     self.assertEqual(u.url_string,
                      u'http://www.w3af.com/abc/123/def.htm')