def test_create_node_with_local_petmail(self):
        basedir = os.path.join(self.make_basedir(), "node1")
        d = self.cliMustSucceed("create-node", basedir,
                                petmail="path-to-real-petmail")
        def _check(out):
            self.failUnless(out.startswith("node created in %s, URL is http://localhost:" % basedir), out)
            local_petmail = os.path.join(basedir, "petmail")
            self.failUnless(os.path.exists(local_petmail))
            with open(local_petmail, "r") as f:
                contents = f.readlines()
            self.failUnlessEqual(contents[0].strip(), "#!/bin/sh")
            pieces = contents[1].split()
            self.failUnlessEqual(pieces[0], os.path.abspath("path-to-real-petmail"))
            self.failUnlessEqual(pieces[1], "-d")
            self.failUnlessEqual(pieces[2], os.path.abspath(basedir))
            self.failUnlessEqual(pieces[3], '"$@"')
        d.addCallback(_check)
        return d
dataset/ETHPy150Open warner/petmail/petmail/test/test_node.py/CLI.test_create_node_with_local_petmail/original