Skip to content

Commit 5385eb1

Browse files
Issue - 661 (Database migration runs during doctest execution) : replaced deprecated code (#713)
* replaced deprecated code Signed-off-by: Veeresh K <[email protected]> * removed whitespaces Signed-off-by: Veeresh K <[email protected]> * Remove auto-generated index.html file This HTML file was accidentally committed. MkDocs automatically generates HTML from the index.md file during the build process. Committed HTML files are not needed and can cause conflicts with the documentation build system. --------- Signed-off-by: Veeresh K <[email protected]> Co-authored-by: Mihai Criveti <[email protected]>
1 parent 6ccc204 commit 5385eb1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

mcpgateway/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ async def lifespan(_app: FastAPI) -> AsyncIterator[None]:
183183
if plugin_manager:
184184
await plugin_manager.initialize()
185185
logger.info(f"Plugin manager initialized with {plugin_manager.plugin_count} plugins")
186+
186187
await tool_service.initialize()
187188
await resource_service.initialize()
188189
await prompt_service.initialize()

mcpgateway/utils/verify_credentials.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ async def verify_jwt_token(token: str) -> dict:
9797
True
9898
9999
Test expired token:
100-
>>> import datetime
101-
>>> expired_payload = {'sub': 'bob', 'exp': datetime.datetime.utcnow() - datetime.timedelta(hours=1)}
100+
>>> from datetime import datetime, timezone, timedelta
101+
>>> expired_payload = {'sub': 'bob', 'exp': datetime.now(timezone.utc) - timedelta(hours=1)}
102102
>>> expired_token = jwt.encode(expired_payload, 'secret', algorithm='HS256')
103103
>>> try:
104104
... asyncio.run(vc.verify_jwt_token(expired_token))

0 commit comments

Comments
 (0)