tests: add test_cache
This commit is contained in:
parent
e2fb91d3fb
commit
64703e8b2d
|
@ -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
|
Loading…
Reference in New Issue