chore: rename project coven → hack-house ⛧
Rebrand the Rust client crate (coven/ → hh/, package+binary "hack-house"), README, CLI strings, and branch (coven → hack-house). Gitea repo renamed cmd-chat → hack-house to match. Crypto/server logic unchanged; selftest + golden-vector test still green, binary is now `hack-house`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Sanic Community Organization
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,100 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: sanic-testing
|
||||
Version: 24.6.0
|
||||
Summary: Core testing clients for Sanic
|
||||
Home-page: https://github.com/sanic-org/sanic-testing/
|
||||
Author: Adam Hopkins
|
||||
Author-email: admhpkns@gmail.com
|
||||
License: MIT
|
||||
Platform: any
|
||||
Classifier: Development Status :: 4 - Beta
|
||||
Classifier: Environment :: Web Environment
|
||||
Classifier: License :: OSI Approved :: MIT License
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Description-Content-Type: text/markdown
|
||||
License-File: LICENSE
|
||||
Requires-Dist: httpx >=0.18
|
||||
Provides-Extra: dev
|
||||
Requires-Dist: pytest ; extra == 'dev'
|
||||
Requires-Dist: sanic >=22.12 ; extra == 'dev'
|
||||
Requires-Dist: pytest-asyncio ; extra == 'dev'
|
||||
Requires-Dist: setuptools ; (python_version > "3.11") and extra == 'dev'
|
||||
|
||||
# Sanic Core Test
|
||||
|
||||
This package is meant to be the core testing utility and clients for testing Sanic applications. It is mainly derived from `sanic.testing` which has (or will be) removed from the main Sanic repository in the future.
|
||||
|
||||
[Documentation](https://sanicframework.org/en/plugins/sanic-testing/getting-started.html)
|
||||
|
||||
## Getting Started
|
||||
|
||||
pip install sanic-testing
|
||||
|
||||
The package is meant to create an almost seemless transition. Therefore, after loading the package, it will attach itself to your Sanic instance and insert test clients.
|
||||
|
||||
```python
|
||||
from sanic import Sanic
|
||||
from sanic_testing import TestManager
|
||||
|
||||
sanic_app = Sanic(__name__)
|
||||
TestManager(sanic_app)
|
||||
```
|
||||
|
||||
This will provide access to both the sync (`sanic.test_client`) and async (`sanic.asgi_client`) clients. Both of these clients are also available directly on the `TestManager` instance.
|
||||
|
||||
## Writing a sync test
|
||||
|
||||
Testing should be pretty much the same as when the test client was inside Sanic core. The difference is just that you need to run `TestManager`.
|
||||
|
||||
```python
|
||||
import pytest
|
||||
|
||||
@pytest.fixture
|
||||
def app():
|
||||
sanic_app = Sanic(__name__)
|
||||
TestManager(sanic_app)
|
||||
|
||||
@sanic_app.get("/")
|
||||
def basic(request):
|
||||
return response.text("foo")
|
||||
|
||||
return sanic_app
|
||||
|
||||
def test_basic_test_client(app):
|
||||
request, response = app.test_client.get("/")
|
||||
|
||||
assert response.body == b"foo"
|
||||
assert response.status == 200
|
||||
```
|
||||
|
||||
## Writing an async test
|
||||
|
||||
Testing of an async method is best done with `pytest-asyncio` installed. Again, the following test should look familiar to anyone that has used `asgi_client` in the Sanic core package before.
|
||||
|
||||
The main benefit of using the `asgi_client` is that it is able to reach inside your application, and execute your handlers without ever having to stand up a server or make a network call.
|
||||
|
||||
```python
|
||||
import pytest
|
||||
|
||||
@pytest.fixture
|
||||
def app():
|
||||
sanic_app = Sanic(__name__)
|
||||
TestManager(sanic_app)
|
||||
|
||||
@sanic_app.get("/")
|
||||
def basic(request):
|
||||
return response.text("foo")
|
||||
|
||||
return sanic_app
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_basic_asgi_client(app):
|
||||
request, response = await app.asgi_client.get("/")
|
||||
|
||||
assert response.body == b"foo"
|
||||
assert response.status == 200
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
sanic_testing-24.6.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
sanic_testing-24.6.0.dist-info/LICENSE,sha256=ljxq2vUrShwTdHmC287CFLjxv9hsdQmSQjO-wrPapnE,1085
|
||||
sanic_testing-24.6.0.dist-info/METADATA,sha256=dgDjAgm7DV_x8gaLEELgifpiJ3z8lt8vunb-QaAqlQ8,3167
|
||||
sanic_testing-24.6.0.dist-info/RECORD,,
|
||||
sanic_testing-24.6.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
sanic_testing-24.6.0.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
|
||||
sanic_testing-24.6.0.dist-info/top_level.txt,sha256=Ta3ak4Fh7-aEThXqp5_aYLywnLIaJr-aSU3jAx5lMkw,14
|
||||
sanic_testing/__init__.py,sha256=C878kG5Ess32Kc0WyPES2negLC5cT454K_dtGTMsL0g,97
|
||||
sanic_testing/__pycache__/__init__.cpython-312.pyc,,
|
||||
sanic_testing/__pycache__/manager.cpython-312.pyc,,
|
||||
sanic_testing/__pycache__/reusable.cpython-312.pyc,,
|
||||
sanic_testing/__pycache__/testing.cpython-312.pyc,,
|
||||
sanic_testing/__pycache__/websocket.cpython-312.pyc,,
|
||||
sanic_testing/manager.py,sha256=7h0BbrLjcPt3Ju2ifhWF54g004Om-GZtJSUk0UI--5I,348
|
||||
sanic_testing/reusable.py,sha256=_qPvPYCmpx1oN_w_mZ-VzlJlVZXuINT4tCQ1nneBN0Q,7499
|
||||
sanic_testing/testing.py,sha256=4LfPpJABex4XAmVczQJZy6KN3Yh9s5TwQtn5i0DwsnU,15154
|
||||
sanic_testing/websocket.py,sha256=UegUQJyeGOD2cw7l8CSUGuPJCYr0cJLrjlS4gmAcYoc,1352
|
||||
@@ -0,0 +1,5 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: setuptools (70.1.1)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
sanic_testing
|
||||
Reference in New Issue
Block a user