This repository has been archived on 2023-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
PyNyaaTa/tests/cache_test.py
2023-01-06 18:19:59 +01:00

15 lines
332 B
Python

from pydantic_factories import ModelFactory
from pynyaata.cache import client
from pynyaata.types import RemoteFile
class RemoteFileFactory(ModelFactory[RemoteFile]):
__model__ = RemoteFile
def test_cache_data():
remote = RemoteFileFactory.build()
client.set("test", remote)
assert client.get("test") == remote