Ejemplo n.º 1
0
 def _createDummyContent(self, session):
     from whiskers.models import Buildout, Package, Version, Host
     host = Host('localhost', '127.0.0.1')
     version = Version('1.0')
     package = Package('req-package-1', version)
     packages = [Package('package1', version),
                 Package('package2', Version('2.0'),
                         requires=[package])]
     buildout = Buildout('buildout', host, 12345, packages=packages)
     session.add(buildout)
     session.flush()
     transaction.commit()
Ejemplo n.º 2
0
    def create_buildout(self):
        from whiskers.models import (
            Buildout,
            Host,
            Package,
            Version,
        )

        host = Host(u'localhost', '127.0.0.1')
        self.session.add(host)
        version = Version('1.0')
        package = Package(u'example.package', version=version)
        buildout = Buildout(name=u"Example", host=host, checksum=1,
                            packages=[package])
        self.session.add(buildout)
Ejemplo n.º 3
0
 def _makePackage(self, name, version):
     from whiskers.models import Package, Version
     version = Version(version)
     return Package(name, version)