fastapi-testing 0.3.1__tar.gz → 0.3.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-testing
3
- Version: 0.3.1
3
+ Version: 0.3.2
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fastapi-testing"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "A lightweight, async-first testing framework for FastAPI applications"
5
5
  authors = [
6
6
  { name = "Ove Ranheim", email = "oranheim@gmail.com" }
@@ -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:
@@ -160,7 +160,7 @@ wheels = [
160
160
 
161
161
  [[package]]
162
162
  name = "fastapi-testing"
163
- version = "0.3.1"
163
+ version = "0.3.2"
164
164
  source = { editable = "." }
165
165
  dependencies = [
166
166
  { name = "fastapi" },
File without changes