MCPcopy Create free account
hub / github.com/ExtendDB/extenddb / test_missing_auth_header

Method test_missing_auth_header

tests/test_auth_integration.py:624–639  ·  view source on GitHub ↗

Request with no auth header returns MissingAuthenticationToken.

(self)

Source from the content-addressed store, hash-verified

622 self.mgmt.delete_user(self.account_id, user)
623
624 def test_missing_auth_header(self):
625 """Request with no auth header returns MissingAuthenticationToken."""
626 # Use a raw HTTP request to avoid boto3 adding auth.
627 resp = requests.post(
628 self.endpoint,
629 headers={
630 "Content-Type": "application/x-amz-json-1.0",
631 "X-Amz-Target": "DynamoDB_20120810.ListTables",
632 },
633 json={},
634 timeout=30,
635 verify=not self.endpoint.startswith("https://"),
636 )
637 assert resp.status_code in (400, 403)
638 body = resp.json()
639 assert body.get("__type", "").endswith("MissingAuthenticationToken")
640# ---------------------------------------------------------------------------
641# Mode 1 Backward Compatibility
642# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

postMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected