Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dizhakbot committed Oct 9, 2021
1 parent 57c0a32 commit 55bfa34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_setnx(self, cache):
def test_setnx_timeout(self, cache):
# test that timeout still works for nx=True
res = cache.set("test_key_nx", 1, timeout=2, nx=True)
assert res
assert res is True
time.sleep(3)
res = cache.get("test_key_nx")
assert res is None
Expand Down Expand Up @@ -249,7 +249,7 @@ def test_delete_return_value_type_new31(self, cache, mocker):
cache.set("a", 1)
res = cache.delete("a")
assert isinstance(res, bool)
assert res
assert res is True
res = cache.delete("b")
assert isinstance(res, bool)
assert res is False
Expand All @@ -259,10 +259,10 @@ def test_delete_return_value_type_before31(self, cache, mocker):
mocker.patch("django_redis.cache.DJANGO_VERSION", new=(3, 0, 1, "final", 0))
cache.set("a", 1)
res = cache.delete("a")
assert type(res) == int
assert isinstance(res, int)
assert res == 1
res = cache.delete("b")
assert type(res) == int
assert isinstance(res, int)
assert res == 0

def test_delete_many(self, cache):
Expand Down

0 comments on commit 55bfa34

Please sign in to comment.