tests: add test_cache

This commit is contained in:
lilydjwg 2018-10-10 17:34:06 +08:00
parent e2fb91d3fb
commit 64703e8b2d
1 changed files with 12 additions and 0 deletions

12
tests/test_cache.py Normal file
View File

@ -0,0 +1,12 @@
# MIT licensed
# Copyright (c) 2018 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = pytest.mark.asyncio
async def test_cache(get_version):
a = await get_version("a", {"cmd": "date +%%Y-%%m-%%d"})
b = await get_version("b", {"cmd": "date +%%Y-%%m-%%d"})
c = await get_version("c", {"cmd": "date"})
assert a == b
assert a != c