Пример #1
0
    def testRefreshAllPackages(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.getEditedRecipeDicts._mock.setReturn(
                                                        (packageRecipes, {}))
        mock.mockMethod(handle.facade.conary.refresh)

        rc = refresh.refreshAllPackages(handle)
        assert(rc is None)
        handle.facade.conary.refresh._mock.assertCalled(
            targetDir=self.workDir+'/foo')
Пример #2
0
    def testRefreshAllPackages(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.getEditedRecipeDicts._mock.setReturn(
            (packageRecipes, {}))
        mock.mockMethod(handle.facade.conary.refresh)

        rc = refresh.refreshAllPackages(handle)
        assert (rc is None)
        handle.facade.conary.refresh._mock.assertCalled(
            targetDir=self.workDir + '/foo')
Пример #3
0
 def refreshAllPackages(self):
     return refresh.refreshAllPackages(self.handle)
Пример #4
0
 def refreshAllPackages(self):
     return refresh.refreshAllPackages(self.handle)