Refactored Binding for better concern consideration
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import dataclasses
|
||||
import json
|
||||
import uuid
|
||||
from dataclasses import dataclass
|
||||
from typing import Self
|
||||
|
||||
from bs4 import BeautifulSoup, Tag
|
||||
@@ -11,6 +9,7 @@ from starlette.responses import Response
|
||||
from starlette.testclient import TestClient
|
||||
|
||||
from myfasthtml.core.utils import mount_utils
|
||||
from myfasthtml.test.MyFT import MyFT
|
||||
|
||||
verbs = {
|
||||
'hx_get': 'GET',
|
||||
@@ -21,14 +20,6 @@ verbs = {
|
||||
}
|
||||
|
||||
|
||||
@dataclass
|
||||
class MyFT:
|
||||
tag: str
|
||||
attrs: dict
|
||||
children: list['MyFT'] = dataclasses.field(default_factory=list)
|
||||
text: str | None = None
|
||||
|
||||
|
||||
class TestableElement:
|
||||
"""
|
||||
Represents an HTML element that can be interacted with in tests.
|
||||
|
||||
Reference in New Issue
Block a user