Esempio n. 1
0
    def test_history_undo_operations_erase_twoavailable(self):
        """Test history_undo_operations with an erase available in two repos."""
        base = Base()
        base._sack = mock_sack('main', 'search')
        operations = NEVRAOperations()
        operations.add('Erase', 'lotus-3-16.x86_64')

        with base:
            base._history_undo_operations(operations)

        transaction_it = iter(base.transaction)
        self.assertEqual(
            next(transaction_it),
            self._create_item_matcher(INSTALL,
                                      installed='lotus-3-16.x86_64',
                                      reason='history'))
        self.assertRaises(StopIteration, next, transaction_it)
Esempio n. 2
0
 def setUp(self):
     """Prepare the test fixture."""
     self._base = Base()
     self._base._sack = mock_sack('main', 'updates')