Skip to content

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

@gandhis1

Description

@gandhis1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions