Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

settings_stub context manager will not remove settings that did not exist before #295

Open
gandhis1 opened this issue Jun 20, 2024 · 0 comments · May be fixed by #296
Open

settings_stub context manager will not remove settings that did not exist before #295

gandhis1 opened this issue Jun 20, 2024 · 0 comments · May be fixed by #296

Comments

@gandhis1
Copy link

gandhis1 commented Jun 20, 2024

If there is a setting that does not exist, settings_stub will gladly add it, but will not remove it.

with settings_stub(SOME_SETTING_THAT_DOES_NOT_EXIST=1):
    print(settings.SOME_SETTING_THAT_DOES_NOT_EXIST)  # Prints 1
print(settings.SOME_SETTING_THAT_DOES_NOT_EXIST)  # Prints 1 instead of raising AttributeError

It ought to remove the setting if it did not exist originally.

@gandhis1 gandhis1 linked a pull request Aug 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant