Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 3
0
 def refreshPackages(self, packageList=None):
     return refresh.refreshPackages(self.handle, packageList)
Exemplo n.º 4
0
 def refreshPackages(self, packageList=None):
     return refresh.refreshPackages(self.handle, packageList)