OpoTests/Python/Controllers/TestController.py

17 lines
555 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from Abstracts.ControllersAbstract import ControllersAbstract
from Interfaces.OpoTestsInterface import OpoTestsInterface
from Models.RequestModel import RequestModel
from typing import Any, Self
class TestController(ControllersAbstract):
def __init__(self:Self, ot:OpoTestsInterface) -> None:
super().__init__(ot, {
"ping": self.ping
})
def ping(self:Self, request:RequestModel) -> tuple[Any|None, dict[str, Any|None]]:
return ("pong", {"mime" : "text/plain"})