def test_substitution(self):
        substitutions = {
            u"DOMAIN": u"example.com",
            u"PATH": u"/some/path",
            u"CODE": u"4242"}
        request = b"GET %(PATH)s HTTP/1.1"
        response = b"HTTP/1.1 %(CODE)s Ok"
        example = Example(
            request=request,
            response=response,
            doc=u'Documentation of some example.'
        )
        lines = list(_formatExample(example, substitutions))
        self.assertEqual(
            [u'**Example:** Documentation of some example.',
             u'',
             u'Request',
             u'',
             u'.. sourcecode:: http',
             u'',
             u'   GET /some/path HTTP/1.1',
             u'   Host: api.example.com',
             u'   Content-Type: application/json',
             u'',
             u'Response',
             u'',
             u'.. sourcecode:: http',
             u'',
             u'   HTTP/1.1 4242 Ok',
             u'   Content-Type: application/json',
             u''], lines)
Initialize the scheduler
dataset/ETHPy150Open ClusterHQ/flocker/flocker/restapi/docs/test/test_publicapi.py/FormatExampleTests.test_substitution--crossover with--dataset/ETHPy150Open istresearch/scrapy-cluster/crawler/crawling/distributed_scheduler.py/DistributedScheduler.__init__