def setUp(self): self.working_dir = tempfile.mkdtemp(prefix='downloader-tests') self.repo = Repository('test-repo', working_dir=self.working_dir) self.config = PluginCallConfiguration({}, {}) self.mock_cancelled_callback = mock.MagicMock().is_cancelled self.mock_cancelled_callback.return_value = False self.mock_progress_report = mock.MagicMock() self.dist = samples.get_valid_repo() self.pkg = model.Package(**samples.get_data('package'))
def setUp(self): self.dist = samples.get_valid_repo() self.cmpt = self.dist["components"][0]
def test_get_indexes(self): dist = samples.get_valid_repo() indexes = dist.get_indexes() self.assertEquals(len(indexes), 3)