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

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

        def nodeCreated(nodeIdentifier):
            uri = gateway.getXMPPURI(componentJID, nodeIdentifier)
            request.args[b'uri'] = [uri]
            request.content = StringIO(b'')

            return _render(self.resource, request)

        d = self.backend.createNode(u'test', ownerJID)
        d.addCallback(nodeCreated)
        d.addCallback(rendered)
        return d
Upon a POST, a new node is created and the URI returned.
dataset/ETHPy150Open ralphm/idavoll/idavoll/test/test_gateway.py/DeleteResourceTest.test_post