Files
nucleus/tests/test_response.py
T
RemiZOffAlex 74595b7a4a
Тестирование ядра / Tester (push) Failing after 3s
Update
2026-06-20 00:40:03 +03:00

28 lines
691 B
Python

__author__ = 'RemiZOffAlex'
__email__ = 'remizoffalex@mail.ru'
import unittest
from io import BytesIO
from nucleus.response.common import Response
from nucleus.response.stream import ResponseStream
class TestResponse(unittest.TestCase):
def test_response_str(self):
response = Response('ok')
for item in ResponseStream(response):
print(item)
def test_response_bytes(self):
response = Response(b'ok')
for item in ResponseStream(response):
print(item)
def test_response_stream(self):
file = BytesIO(b'ok')
response = Response(file)
for item in ResponseStream(response):
print(item)