def test_push_cib_upgraded_live(self, mock_replace_cib): env = LibraryEnvironment(self.mock_logger, self.mock_reporter) env._cib_upgraded = True env.push_cib(etree.XML('<cib/>')) mock_replace_cib.assert_called_once_with("mock cmd runner", '<cib/>', True) assert_report_item_list_equal( env.report_processor.report_item_list, [(severity.INFO, report_codes.CIB_UPGRADE_SUCCESSFUL, {})])
def test_push_cib_upgraded_live(self, mock_replace_cib): env = LibraryEnvironment(self.mock_logger, self.mock_reporter) env._cib_upgraded = True env.push_cib(etree.XML('<cib/>')) mock_replace_cib.assert_called_once_with( "mock cmd runner", '<cib/>' ) self.assertFalse(env.cib_upgraded)
def test_push_cib_upgraded_live(self, mock_replace_cib): env = LibraryEnvironment(self.mock_logger, self.mock_reporter) env._cib_upgraded = True env.push_cib(etree.XML('<cib/>')) mock_replace_cib.assert_called_once_with( "mock cmd runner", '<cib/>', True ) assert_report_item_list_equal( env.report_processor.report_item_list, [( severity.INFO, report_codes.CIB_UPGRADE_SUCCESSFUL, {} )] )
def test_push_cib_upgraded_live(self, mock_replace_cib): env = LibraryEnvironment(self.mock_logger, self.mock_reporter) env._cib_upgraded = True env.push_cib(etree.XML('<cib/>')) mock_replace_cib.assert_called_once_with("mock cmd runner", '<cib/>') self.assertFalse(env.cib_upgraded)