def test_found_at(self): dc = JSONContainer(COMPLEX_OBJECT) freq = FuzzableRequest(self.url, post_data=dc, method='PUT') m = JSONMutant(freq) m.get_dc().set_token(('object-second_key-list-0-string', )) expected = '"http://www.w3af.com/", using HTTP method PUT.' \ ' The sent JSON-data was: "...object-second_key-list-' \ '0-string=abc..."' self.assertEqual(m.found_at(), expected) headers = m.get_headers() self.assertIn('Content-Type', headers) self.assertEqual(headers['Content-Type'], 'application/json')
def test_found_at(self): dc = JSONContainer(COMPLEX_OBJECT) freq = FuzzableRequest(self.url, post_data=dc, method='PUT') m = JSONMutant(freq) m.get_dc().set_token(('object-second_key-list-0-string',)) expected = '"http://www.w3af.com/", using HTTP method PUT.'\ ' The sent JSON-data was: "...object-second_key-list-'\ '0-string=abc..."' self.assertEqual(m.found_at(), expected) headers = m.get_headers() self.assertIn('Content-Type', headers) self.assertEqual(headers['Content-Type'], 'application/json')