@defer.inlineCallbacks
    def makeRequest(self, request, expected, advance=None):
        if not isinstance(request, basestring):
            request = json.dumps(request)
        d = self.service.call(request)
        if advance:
            clock.advance(advance)
        response = yield d
        if response is not None:
            response = json.loads(response)
        self.assertEqual(response, expected)
dataset/ETHPy150Open flowroute/txjason/txjason/tests/test_service.py/ServiceTestCase.makeRequest/original