MCPcopy
hub / github.com/h2oai/wave / test_cache

Method test_cache

py/tests/test_python_server.py:451–460  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

449 assert svg.index('<svg') == 0
450
451 def test_cache(self):
452 d1 = dict(foo='bar', qux=42)
453 site.cache.set('test', 'data', d1)
454 keys = site.cache.keys('test')
455 assert len(keys) == 1
456 assert keys[0] == 'data'
457 d2 = site.cache.get('test', 'data')
458 assert isinstance(d2, dict)
459 assert d2['foo'] == d1['foo']
460 assert d2['qux'] == d1['qux']
461
462 def test_multipart_server(self):
463 file_handle = open('../assets/brand/wave.svg', 'rb')

Callers

nothing calls this directly

Calls 4

dictFunction · 0.85
setMethod · 0.65
getMethod · 0.65
keysMethod · 0.45

Tested by

no test coverage detected