'L{app.CProfileRunner.run} should call the C{run} method of the
reactor and save profile data in the specified file.'

def test_cProfile(self):

    config = twistd.ServerOptions()
    config['profile'] = self.mktemp()
    config['profiler'] = 'cProfile'
    profiler = app.AppProfiler(config)
    reactor = DummyReactor()
    profiler.run(reactor)
    self.assertTrue(reactor.called)
    with open(config['profile']) as f:
        data = f.read()
    self.assertIn('run', data)
    self.assertIn('function    calls', data)
