Example #1
0
    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')
Example #2
0
    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')
Example #3
0
 def refreshPackages(self, packageList=None):
     return refresh.refreshPackages(self.handle, packageList)
Example #4
0
 def refreshPackages(self, packageList=None):
     return refresh.refreshPackages(self.handle, packageList)