def test_no_modification(self):
        fwe = full_width_encode()

        u = URL('http://www.w3af.com/')
        r = HTTPRequest( u )
        self.assertEqual(fwe.modify_request( r ).url_object.url_string,
                         u'http://www.w3af.com/')
Example #2
0
    def test_no_modification(self):
        fwe = full_width_encode()

        u = URL('http://www.w3af.com/')
        r = HTTPRequest(u)
        self.assertEqual(
            fwe.modify_request(r).url_object.url_string,
            u'http://www.w3af.com/')
    def test_modify_path_filename(self):
        fwe = full_width_encode()
        
        u = URL('http://www.w3af.com/hola-mundo')
        r = HTTPRequest( u )
        self.assertEqual(fwe.modify_request( r ).url_object.url_string,
                         u'http://www.w3af.com/%uFF48%uFF4f%uFF4c%uFF41%uFF0d%uFF4d%uFF55%uFF4e%uFF44%uFF4f')

        #
        #    The plugins should not modify the original request
        #
        self.assertEqual(u.url_string,
                         u'http://www.w3af.com/hola-mundo')
Example #4
0
    def test_modify_path_filename(self):
        fwe = full_width_encode()

        u = URL('http://www.w3af.com/hola-mundo')
        r = HTTPRequest(u)
        self.assertEqual(
            fwe.modify_request(r).url_object.url_string,
            u'http://www.w3af.com/%uFF48%uFF4f%uFF4c%uFF41%uFF0d%uFF4d%uFF55%uFF4e%uFF44%uFF4f'
        )

        #
        #    The plugins should not modify the original request
        #
        self.assertEqual(u.url_string, u'http://www.w3af.com/hola-mundo')