import unittest

from settings import merge_settings


class HoldoutMergeTests(unittest.TestCase):
    def test_three_level_merge_and_no_alias(self):
        base = {"a": {"b": {"left": 1}}, "untouched": {"x": 1}}
        overlay = {"a": {"b": {"right": 2}}}
        merged = merge_settings(base, overlay)
        self.assertEqual(merged["a"]["b"], {"left": 1, "right": 2})
        merged["untouched"]["x"] = 9
        self.assertEqual(base["untouched"]["x"], 1)
