def test_delete_and_set_again(settings):
    """asserts variable can be deleted and set again"""

    # set
    settings.TODELETE2 = True
    assert "TODELETE2" in settings
    assert settings.TODELETE2 is True

    # delete
    del settings.TODELETE2
    assert settings.exists("TODELETE2") is False
    assert settings.get("TODELETE2") is None

    # set again
    settings.TODELETE2 = "new value"
    assert settings.TODELETE2 == "new value"
asserts variable can be deleted and set again
tests/test_base.py