@inlineCallbacks
def test_request_with_unexpected_parameters(self):
    (yield self.get_transport())
    response = (yield self.tx_helper.mk_request(unexpected_p1='', unexpected_p2=''))
    self.assertEqual(response.code, 400)
    body = json.loads(response.delivered_body)
    self.assertEqual(set(['unexpected_parameter']), set(body.keys()))
    self.assertEqual(sorted(body['unexpected_parameter']), ['unexpected_p1', 'unexpected_p2'])
@inlineCallbacks
def test_request_with_unexpected_parameters(self):
    (yield self.get_transport())
    response = (yield self.tx_helper.mk_request(unexpected_p1=, unexpected_p2=))
    self.assertEqual(response.code, 400)
    body = json.loads(response.delivered_body)
    self.assertEqual(set(['unexpected_parameter']), set(body.keys()))
    self.assertEqual(sorted(body['unexpected_parameter']), ['unexpected_p1', 'unexpected_p2'])