fastapi-testing 0.3.1__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -161,4 +161,8 @@ cython_debug/
161
161
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
162
  .idea/
163
163
 
164
+ # macOS
165
+ .DS_Store
166
+ **/.DS_Store
167
+
164
168
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-testing
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: A lightweight, async-first testing framework for FastAPI applications
5
5
  Project-URL: Homepage, https://github.com/descoped/fastapi-testing
6
6
  Project-URL: Repository, https://github.com/descoped/fastapi-testing
@@ -22,11 +22,11 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
22
  Classifier: Topic :: Software Development :: Testing
23
23
  Classifier: Typing :: Typed
24
24
  Requires-Python: >=3.11
25
- Requires-Dist: fastapi>=0.116.1
25
+ Requires-Dist: fastapi>=0.137.2
26
26
  Requires-Dist: httpx[http2]>=0.28.1
27
- Requires-Dist: starlette>=0.47.2
28
- Requires-Dist: uvicorn>=0.35.0
29
- Requires-Dist: websockets>=15.0.1
27
+ Requires-Dist: starlette>=1.3.1
28
+ Requires-Dist: uvicorn>=0.49.0
29
+ Requires-Dist: websockets>=16.0
30
30
  Description-Content-Type: text/markdown
31
31
 
32
32
  # FastAPI Testing
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fastapi-testing"
3
- version = "0.3.1"
3
+ version = "0.3.3"
4
4
  description = "A lightweight, async-first testing framework for FastAPI applications"
5
5
  authors = [
6
6
  { name = "Ove Ranheim", email = "oranheim@gmail.com" }
@@ -24,26 +24,26 @@ classifiers = [
24
24
  "License :: OSI Approved :: MIT License",
25
25
  ]
26
26
  dependencies = [
27
- "fastapi>=0.116.1",
28
- "starlette>=0.47.2",
29
- "uvicorn>=0.35.0",
27
+ "fastapi>=0.137.2",
28
+ "starlette>=1.3.1",
29
+ "uvicorn>=0.49.0",
30
30
  "httpx[http2]>=0.28.1",
31
- "websockets>=15.0.1",
31
+ "websockets>=16.0",
32
32
  ]
33
33
 
34
34
  [dependency-groups]
35
35
  dev = [
36
- "pytest>=8.3.0",
37
- "pytest-asyncio>=0.25.2",
38
- "pytest-cov>=6.0.0",
39
- "pydantic>=2.10.6",
40
- "ruff>=0.8.0",
41
- "restructuredtext-lint>=1.4.0",
42
- "pygments>=2.19.1",
36
+ "pytest>=9.1.0",
37
+ "pytest-asyncio>=1.4.0",
38
+ "pytest-cov>=7.1.0",
39
+ "pydantic>=2.13.4",
40
+ "ruff>=0.15.17",
41
+ "restructuredtext-lint>=2.0.2",
42
+ "pygments>=2.20.0",
43
43
  ]
44
44
 
45
45
  [build-system]
46
- requires = ["hatchling>=1.26.3"]
46
+ requires = ["hatchling>=1.30.1"]
47
47
  build-backend = "hatchling.build"
48
48
 
49
49
  [tool.hatch.build.targets.wheel]
@@ -209,6 +209,13 @@ class AsyncTestResponse:
209
209
  raise InvalidResponseTypeError("WebSocket connections don't have status codes")
210
210
  return self._response.status_code
211
211
 
212
+ @property
213
+ def headers(self) -> httpx.Headers:
214
+ """Get response headers (HTTP only)."""
215
+ if self._is_websocket:
216
+ raise InvalidResponseTypeError("WebSocket connections don't have headers")
217
+ return self._response.headers
218
+
212
219
  def websocket(self) -> ClientConnection:
213
220
  """Get WebSocket connection (WebSocket only)."""
214
221
  if not self._is_websocket: