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

15 lines
334 B
Python
Raw Normal View History

2023-01-06 13:17:11 +00:00
from pydantic_factories import ModelFactory
2023-06-04 15:53:29 +00:00
from pynyaata2.cache import client
from pynyaata2.types import RemoteFile
2023-01-06 13:17:11 +00:00
2023-01-06 17:19:59 +00:00
class RemoteFileFactory(ModelFactory[RemoteFile]):
2023-01-06 13:17:11 +00:00
__model__ = RemoteFile
def test_cache_data():
remote = RemoteFileFactory.build()
client.set("test", remote)
assert client.get("test") == remote