From 64703e8b2d1a2a048fe477be5769d110ddf445ca Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Wed, 10 Oct 2018 17:34:06 +0800 Subject: [PATCH] tests: add test_cache --- tests/test_cache.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/test_cache.py diff --git a/tests/test_cache.py b/tests/test_cache.py new file mode 100644 index 0000000..17ecf81 --- /dev/null +++ b/tests/test_cache.py @@ -0,0 +1,12 @@ +# MIT licensed +# Copyright (c) 2018 lilydjwg , 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