Here are the examples of the python api mock.Branch taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
3
Example 1
def setUp(self):
super(BuildTestCase, self).setUp()
self.branch = mock.Branch(os.path.join(self.config.buildroot, 'nonexistent'))
self.branch.config = self.config
self.packagedb = None
self.buildscript = None
self.moduleset = None
os.environ['JHBUILD_PREFIX'] = self.config.prefix
3
Example 2
def setUp(self):
super(TwoModulesTestCase, self).setUp()
self.foo_branch = mock.Branch(os.path.join(self.config.buildroot, 'nonexistent-foo'))
self.modules = [mock.MockModule('foo', branch=self.foo_branch),
mock.MockModule('bar', branch=self.branch)]
self.modules[0].config = self.config
self.modules[1].config = self.config