def test_success(self, mock_push_cib, mock_get_topology, mock_export): mock_get_topology.return_value = "topology el" mock_export.return_value = "exported config" lib_env = create_lib_env() self.assertEqual("exported config", lib.get_config(lib_env)) mock_export.assert_called_once_with("topology el") mock_get_topology.assert_called_once_with("mocked cib") mock_push_cib.assert_not_called()
def test_success(self, mock_push_cib, mock_get_topology, mock_export): mock_get_topology.return_value = "topology el" mock_export.return_value = "exported config" lib_env = create_lib_env() self.assertEqual("exported config", lib.get_config(lib_env)) mock_export.assert_called_once_with("topology el") mock_get_topology.assert_called_once_with("mocked cib") mock_push_cib.assert_not_called()