MCPcopy Create free account
hub / github.com/psf/cachecontrol / test_set_expiration_datetime

Method test_set_expiration_datetime

tests/test_storage_redis.py:16–18  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

14 self.cache = RedisCache(self.conn)
15
16 def test_set_expiration_datetime(self):
17 self.cache.set("foo", "bar", expires=datetime(2014, 2, 2))
18 assert self.conn.setex.called
19
20 def test_set_expiration_datetime_aware(self):
21 self.cache.set("foo", "bar", expires=datetime(2014, 2, 2, tzinfo=timezone.utc))

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected