halfapi/tests/test_domain.py

25 lines
611 B
Python
Raw Permalink Normal View History

import pytest
from halfapi.testing.test_domain import TestDomain
from pprint import pprint
class TestDummyDomain(TestDomain):
from .dummy_domain import __name__, __routers__
DOMAIN = __name__
ROUTERS = __routers__
ACL = '.acl'
2022-08-19 18:45:45 +02:00
"""
def test_domain(self):
self.check_domain()
def test_routes(self):
self.check_routes()
2022-08-19 18:45:45 +02:00
"""
def test_html_route(self):
res = self.client.get('/ret_type')
assert res.status_code == 200
assert isinstance(res.content.decode(), str)
assert res.headers['content-type'].split(';')[0] == 'text/html'