def test_apply_overwrites_in_nested_dict_additional_values() -> None:
    """Verify nested dict in default content settings are correctly added."""
    expected_context = {
        'nested_dict_additional': OrderedDict(
            [
                ('mainkey1', 'mainvalue1'),
                (
                    'mainkey2',
                    OrderedDict(
                        [
                            ('subkey1', 'subvalue1'),
                            (
                                'subkey2',
                                OrderedDict(
                                    [
                                        ('subsubkey1', 'subsubvalue1'),
                                        ('subsubkey2', 'subsubvalue2_default'),
                                        ('subsubkey3', 'subsubvalue3_extra'),
                                    ]
                                ),
                            ),
                            ('subkey4', 'subvalue4_default'),
                            ('subkey5', 'subvalue5_extra'),
                        ]
                    ),
                ),
            ]
        )
    }

    generated_context = generate.generate_context(
        context_file='tests/test-generate-context/nested_dict_additional.json',
        default_context={
            'not_in_template': 'foobar',
            'mainkey2': {
                'subkey2': {
                    'subsubkey2': 'subsubvalue2_default',
                },
                'subkey4': 'subvalue4_default',
            },
        },
        extra_context={
            'also_not_in_template': 'foobar2',
            'mainkey2': {
                'subkey2': {
                    'subsubkey3': 'subsubvalue3_extra',
                },
                'subkey5': 'subvalue5_extra',
            },
        },
    )

    assert generated_context == expected_context
Verify nested dict in default content settings are correctly added.
tests/test_generate_context.py