mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-05-07 22:02:38 +00:00
cleanup(tests): Major rework of inventory unit tests
Rework the inventory unit tests by splitting up tests/unit/plugins/inventory/test_kubevirt.py into multiple files, by trying to simplify the test code and making it more robust and by using appropriate fixtures. This also adds new tests or test cases to improve code coverage. Tests that work from the black box perspective are now located in a subdirectory. Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2024 Red Hat, Inc.
|
||||
# Apache License 2.0 (see LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
from copy import deepcopy
|
||||
|
||||
|
||||
def merge_dicts(dict1, dict2):
|
||||
merged = deepcopy(dict1)
|
||||
for key, value in dict2.items():
|
||||
if key in merged and isinstance(merged[key], dict) and isinstance(value, dict):
|
||||
merged[key] = merge_dicts(merged[key], value)
|
||||
else:
|
||||
merged[key] = value
|
||||
|
||||
return merged
|
||||
Reference in New Issue
Block a user