def testRefreshPackages(self): handle = self.getRbuildHandle() from rbuild_plugins.build import refresh packagePath = self.workDir + '/foo/foo.recipe' # Mock the productStore and its needed methods. handle.productStore = mock.MockObject() packageRecipes = {'foo' : packagePath} handle.productStore.getPackagePath._mock.setReturn(packagePath, 'foo') mock.mockMethod(handle.facade.conary.refresh) rc = refresh.refreshPackages(handle, ['foo']) assert(rc is None) handle.facade.conary.refresh._mock.assertCalled( targetDir=self.workDir+'/foo/foo.recipe')
def testRefreshPackages(self): handle = self.getRbuildHandle() from rbuild_plugins.build import refresh packagePath = self.workDir + '/foo/foo.recipe' # Mock the productStore and its needed methods. handle.productStore = mock.MockObject() packageRecipes = {'foo': packagePath} handle.productStore.getPackagePath._mock.setReturn(packagePath, 'foo') mock.mockMethod(handle.facade.conary.refresh) rc = refresh.refreshPackages(handle, ['foo']) assert (rc is None) handle.facade.conary.refresh._mock.assertCalled( targetDir=self.workDir + '/foo/foo.recipe')
def refreshPackages(self, packageList=None): return refresh.refreshPackages(self.handle, packageList)