mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
tests: add test_cache
This commit is contained in:
parent
e2fb91d3fb
commit
64703e8b2d
1 changed files with 12 additions and 0 deletions
12
tests/test_cache.py
Normal file
12
tests/test_cache.py
Normal 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
|
Loading…
Add table
Reference in a new issue