def test_postMalformedXMPPURI(self):
        request = DummyRequest([b''])
        request.method = b'POST'

        def rendered(result):
            self.assertEqual(http.BAD_REQUEST, request.responseCode)

        uri = 'xmpp:@@@@'
        request.args[b'uri'] = [uri]
        request.content = StringIO(b'')

        d = _render(self.resource, request)
        d.addCallback(rendered)
        return d
If the XMPP URI is malformed, Bad Request is returned.
dataset/ETHPy150Open ralphm/idavoll/idavoll/test/test_gateway.py/DeleteResourceTest.test_postMalformedXMPPURI