test-platform/server/cgi/test_list.py

13 lines
304 B
Python
Raw Normal View History

2024-05-25 19:18:26 +03:00
import mariadb as mdb
from db.test import TestPool
class TestList:
def __init__(self, cursor):
self.cursor = cursor
def render(self):
tp = TestPool(self.cursor)
rendered_chunks = [i.render_short() for i in tp.object_pool.pool]
return "\n".join(rendered_chunks)