mirror of
https://github.com/PaiGramTeam/SIMNet.git
synced 2024-11-16 12:02:17 +00:00
18 lines
597 B
Python
18 lines
597 B
Python
|
import pytest
|
||
|
|
||
|
from simnet.client.base import BaseClient
|
||
|
from simnet.client.cookies import Cookies
|
||
|
|
||
|
|
||
|
@pytest.mark.asyncio
|
||
|
class TestBaseClient:
|
||
|
@staticmethod
|
||
|
async def test_cookies():
|
||
|
async with BaseClient(cookies={"uid": "114514"}) as client:
|
||
|
assert isinstance(client.cookies, Cookies)
|
||
|
client.cookies = {"account_id": "114514"}
|
||
|
assert isinstance(client.cookies, Cookies)
|
||
|
assert client.cookies.get("account_id") == "114514"
|
||
|
client.cookies.set("stuid", "114514")
|
||
|
assert client.cookies.get("stuid") == "114514"
|