Skip to content

Commit

Permalink
Merge pull request #331 from mehdy/main
Browse files Browse the repository at this point in the history
Add test to ensure default value for cache works
  • Loading branch information
sergeyklay authored Oct 6, 2021
2 parents a8871d0 + d482353 commit ca78fb6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,11 @@ def test_cache_url_password_using_gen_delims(monkeypatch, chars):
result = env.cache()
assert result['BACKEND'] == 'django_redis.cache.RedisCache'
assert result['LOCATION'] == url


def test_cache_url_env_using_default():
env = Env(CACHE_URL=(str, "locmemcache://"))
result = env.cache()

assert result["BACKEND"] == "django.core.cache.backends.locmem.LocMemCache"
assert result["LOCATION"] == ""

0 comments on commit ca78fb6

Please sign in to comment.