def test_get_with_sysenv_fallback_local_overrides():
    """
    When there are local overrides
    Should behave according to the overrides
    """
    # global is False
    settings = Dynaconf(sysenv_fallback=False)
    settings.environ["TEST_KEY"] = "TEST_VALUE"

    assert settings.sysenv_fallback_for_dynaconf is False
    assert not settings.get("test_key")
    assert not settings.get("test_key", sysenv_fallback=["foo_key"])
    assert settings.get("test_key", sysenv_fallback=True) == "TEST_VALUE"
    assert (
        settings.get("test_key", sysenv_fallback=["test_key"]) == "TEST_VALUE"
    )

    # global is True
    settings = Dynaconf(sysenv_fallback=True)
    settings.environ["ANOTHER_TEST"] = "ANOTHER_VALUE"

    assert settings.sysenv_fallback_for_dynaconf is True
    assert settings.get("another_test") == "ANOTHER_VALUE"
    assert not settings.get("another_test", sysenv_fallback=False)

    When there are local overrides
    Should behave according to the overrides
    
tests/test_base.py