示例#1
0
文件: tests.py 项目: href/plock
    def test_create_cfg(self):
        from plock.install import Installer
        from tempfile import mkdtemp
        plock = Installer()
        plock.directory = mkdtemp()
        plock.create_cfg(('one', 'two', 'three'))

        with open(os.path.join(plock.directory, 'buildout.cfg'), 'r') as f:
            content = f.read()

        self.assertIn('one', content)
        self.assertIn('two', content)
        self.assertIn('three', content)
示例#2
0
    def test_create_cfg(self):
        from plock.install import Installer
        from tempfile import mkdtemp
        plock = Installer()
        plock.directory = mkdtemp()
        plock.create_cfg(('one', 'two', 'three'))

        with open(os.path.join(plock.directory, 'buildout.cfg'), 'r') as f:
            content = f.read()

        self.assertIn('one', content)
        self.assertIn('two', content)
        self.assertIn('three', content)
示例#3
0
 def test_create_cfg(self):
     from plock.install import Installer
     from tempfile import mkdtemp
     plock = Installer()
     plock.directory = mkdtemp()
     buildout_cfg = os.path.join(plock.directory, 'buildout.cfg')
     heroku_cfg = os.path.join(plock.directory, 'heroku.cfg')
     plock.create_cfg(
         buildout_cfg,
         heroku_cfg,
         extends='https://raw.github.com/plock/pins/master/dev')
     with open(buildout_cfg, 'r') as f:
         file_contents = f.read()
     self.assertIn('https://raw.github.com/plock/pins/master/dev',
                   file_contents)