completed renaming to Kaya

This commit is contained in:
2026-07-15 21:00:04 +08:00
parent c7aece9488
commit eca6da3dc3
6 changed files with 30 additions and 16 deletions
+5 -5
View File
@@ -2,15 +2,15 @@ import unittest
import json
import httpx
from pwo import async_test
from kaya import BugisApp, HttpContext, HttpMethod
from kaya import KayaApp, HttpContext, HttpMethod
from typing import Sequence, List
class AsgiTest(unittest.TestCase):
app: BugisApp
app: KayaApp
def setUp(self):
self.app = BugisApp()
self.app = KayaApp()
@self.app.GET('/hello')
@self.app.GET('/hello2')
@@ -105,7 +105,7 @@ class AsgiTest(unittest.TestCase):
@async_test
async def test_method_agnostic_fallback_order_independence(self):
app = BugisApp()
app = KayaApp()
@app.route(('/foo/*',), recursive=True)
async def handle_request(ctx: HttpContext, path: Sequence[str]) -> None:
@@ -128,7 +128,7 @@ class AsgiTest(unittest.TestCase):
@async_test
async def test_disjoint_method_specific_matchers(self):
app = BugisApp()
app = KayaApp()
@app.route(('/foo/*',), HttpMethod.PUT, recursive=True)
async def handle_request(ctx: HttpContext, path: Sequence[str]) -> None:
+3 -3
View File
@@ -1,7 +1,7 @@
import unittest
from typing import Any, Callable, Awaitable, List, Mapping, Optional
from pwo import async_test
from kaya import BugisApp, WebSocket, WebSocketMessage
from kaya import KayaApp, WebSocket, WebSocketMessage
def websocket_scope(path: str = '/ws') -> Mapping[str, Any]:
@@ -23,10 +23,10 @@ def websocket_scope(path: str = '/ws') -> Mapping[str, Any]:
class WebSocketTest(unittest.TestCase):
app: BugisApp
app: KayaApp
def setUp(self):
self.app = BugisApp()
self.app = KayaApp()
@self.app.websocket('/echo')
async def echo(ws: WebSocket) -> None: