def testControllerCompletesToken(self):
        code = """longNameVariable=10"""
        def testCompletes(result):
            self.assert_("longNameVariable" in result)

        def testCompleteToken(result):
            self.controller.complete("longNa").addCallback(testCompletes)

        self.controller.execute(code).addCallback(testCompletes)
dataset/ETHPy150Open ipython/ipython-py3k/IPython/deathrow/oldfrontend/cocoa/tests/test_cocoa_frontend.py/TestIPythonCocoaControler.testControllerCompletesToken/original