def test_has_transaction_present(self): """Test has_transaction with a transaction present.""" yum_history = support.HistoryStub() yum_history.old_data_pkgs["1"] = ( dnf.yum.history.YumHistoryPackageState("lotus", "x86_64", "0", "3", "16", "Erase", history=yum_history), ) with self._create_wrapper(yum_history) as history: present = history.has_transaction(1) self.assertTrue(present)
def test_has_transaction_present(self): """Test has_transaction with a transaction present.""" yum_history = support.HistoryStub() yum_history.old_data_pkgs['1'] = ( dnf.yum.history.YumHistoryPackageState( 'lotus', 'x86_64', '0', '3', '16', 'Erase', history=yum_history),) with self._create_wrapper(yum_history) as history: present = history.has_transaction(1) self.assertTrue(present)
def test_has_transaction_present(self): """Test has_transaction with a transaction present.""" yum_history = support.HistoryStub() yum_history.old_data_pkgs['1'] = ( dnf.yum.history.YumHistoryPackageState('lotus', 'x86_64', '0', '3', '16', 'Erase', history=yum_history), ) with self._create_wrapper(yum_history) as history: present = history.has_transaction(1) self.assertTrue(present)
def test_has_transaction_absent(self): """Test has_transaction without any transaction.""" with self._create_wrapper(support.HistoryStub()) as history: present = history.has_transaction(1) self.assertFalse(present)