Restrict local API to loopback clients
This commit is contained in:
@@ -186,10 +186,14 @@ class KnowledgeIndexTests(unittest.TestCase):
|
||||
owner_token, _ = auth.issue_session(owner_id)
|
||||
other_token, _ = auth.issue_session(other_id)
|
||||
owner_client = TestClient(
|
||||
app, headers={"Authorization": f"Bearer {owner_token}"}
|
||||
app,
|
||||
headers={"Authorization": f"Bearer {owner_token}"},
|
||||
client=("127.0.0.1", 8000),
|
||||
)
|
||||
other_client = TestClient(
|
||||
app, headers={"Authorization": f"Bearer {other_token}"}
|
||||
app,
|
||||
headers={"Authorization": f"Bearer {other_token}"},
|
||||
client=("127.0.0.1", 8000),
|
||||
)
|
||||
with patch.dict(
|
||||
os.environ,
|
||||
|
||||
Reference in New Issue
Block a user