
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
async-asgi-testclient
Advanced tools
Async ASGI TestClient is a library for testing web applications that implements ASGI specification (version 2 and 3).
The motivation behind this project is building a common testing library that doesn't depend on the web framework (Quart, Startlette, ...).
It works by calling the ASGI app directly. This avoids the need to run the app with a http server in a different process/thread/asyncio-loop. Since the app and test run in the same asyncio loop, it's easier to write tests and debug code.
This library is based on the testing module provided in Quart.
Requirements: Python 3.6+
Installation:
pip install async-asgi-testclient
my_api.py
:
from quart import Quart, jsonify
app = Quart(__name__)
@app.route("/")
async def root():
return "plain response"
@app.route("/json")
async def json():
return jsonify({"hello": "world"})
if __name__ == '__main__':
app.run()
test_app.py
:
from async_asgi_testclient import TestClient
import pytest
@pytest.mark.asyncio
async def test_quart_app():
from .my_api import app
async with TestClient(app) as client:
resp = await client.get("/")
assert resp.status_code == 200
assert resp.text == "plain response"
resp = await client.get("/json")
assert resp.status_code == 200
assert resp.json() == {"hello": "world"}
FAQs
Async client for testing ASGI web applications
We found that async-asgi-testclient demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.