def test_apply_overwrites_in_nested_dict() -> None:
    """Verify nested dict in default content settings are correctly replaced."""
    expected_context = {
        'nested_dict': OrderedDict(
            [
                ('full_name', 'Raphael Pierzina'),
                ('github_username', 'hackebrot'),
                (
                    'project',
                    OrderedDict(
                        [
                            ('name', 'My Kivy Project'),
                            ('description', 'My Kivy Project'),
                            ('repo_name', '{{cookiecutter.project_name|lower}}'),
                            ('orientation', ["all", "landscape", "portrait"]),
                        ]
                    ),
                ),
            ]
        )
    }

    generated_context = generate.generate_context(
        context_file='tests/test-generate-context/nested_dict.json',
        default_context={
            'not_in_template': 'foobar',
            'project': {
                'description': 'My Kivy Project',
            },
        },
        extra_context={
            'also_not_in_template': 'foobar2',
            'github_username': 'hackebrot',
            'project': {
                'name': 'My Kivy Project',
            },
        },
    )

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