def test_mock_configdir(self): self.init_test('test_misc', argv=['-n','python-test'], buildroot='default', options='--configdir=mock-config') Mock.reset() Mock._get_root() self.assertEqual(Mock.mock_root, 'fedora-12-i786')
def test_mock_options(self): ''' test -o/--mock-options and -m/mock-config ''' nextrelease = '%d' % (int(RELEASE) + 1) v = nextrelease if RELEASE in self.BUILDROOT else RELEASE buildroot = 'fedora-%s-i386' % v self.init_test('mock-options', argv = ['-n', 'python-test', '--cache'], options='--resultdir=results --uniqueext=foo', buildroot=buildroot) bug = NameBug('python-test') bug.find_urls() bug.download_files() mock_cmd = ' '.join(Mock._mock_cmd()) Mock._get_root() self.assertIn('-r ' + buildroot, mock_cmd) self.assertEqual(Mock.mock_root, buildroot + '-foo')