def test_extended_config_getitem_and_getattr():
    """Test that __getitem__ and __getattr__ can be used to access values.

    This test verifies that values in the ExtendedConfig instance can be accessed
    both via attribute access and dictionary-style access.
    """
    data = {'key1': 'value1', 'key2': 2}
    ext_cfg = ExtendedConfig.from_dict(data)

    # Attribute access
    assert ext_cfg.key1 == 'value1'
    # Dictionary-style access
    assert ext_cfg['key2'] == 2
Test that __getitem__ and __getattr__ can be used to access values.

    This test verifies that values in the ExtendedConfig instance can be accessed
    both via attribute access and dictionary-style access.
    
tests/unit/test_config_extended.py