2022-08-18 20:19:36 +02:00
|
|
|
import pytest
|
2021-12-01 17:02:23 +01:00
|
|
|
from halfapi.testing.test_domain import TestDomain
|
|
|
|
from pprint import pprint
|
|
|
|
|
|
|
|
class TestDummyDomain(TestDomain):
|
2022-02-10 11:59:40 +01:00
|
|
|
from .dummy_domain import __name__, __routers__
|
|
|
|
|
2021-12-01 17:02:23 +01:00
|
|
|
DOMAIN = __name__
|
|
|
|
ROUTERS = __routers__
|
2022-05-17 16:01:58 +02:00
|
|
|
ACL = '.acl'
|
2021-12-01 17:02:23 +01:00
|
|
|
|
2022-08-19 18:45:45 +02:00
|
|
|
"""
|
2021-12-01 17:02:23 +01:00
|
|
|
def test_domain(self):
|
|
|
|
self.check_domain()
|
2021-12-04 09:56:14 +01:00
|
|
|
|
|
|
|
def test_routes(self):
|
|
|
|
self.check_routes()
|
2022-08-19 18:45:45 +02:00
|
|
|
"""
|
2022-08-18 20:19:36 +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'
|