Skip to content

Commit

Permalink
Use utc time in mocked data
Browse files Browse the repository at this point in the history
  • Loading branch information
elic-eon committed Jul 30, 2024
1 parent 7cf4da1 commit c4552ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/oracle/expected_query_logs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"platform": "ORACLE",
"queryId": "sql-id",
"sql": "SELECT...",
"startTime": "2024-07-30T23:31:33+00:00",
"startTime": "2024-07-30T15:31:33+00:00",
"userId": "DEV"
}
]
12 changes: 10 additions & 2 deletions tests/oracle/test_extractor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime
from datetime import datetime, timezone
from unittest.mock import MagicMock, patch

import pytest
Expand Down Expand Up @@ -123,7 +123,15 @@ def mock_connection():
)

cursor.__iter__.return_value = iter(
[("DEV", "SELECT...", datetime.fromtimestamp(1722353493), 10.0, "sql-id")]
[
(
"DEV",
"SELECT...",
datetime.fromtimestamp(1722353493, tz=timezone.utc),
10.0,
"sql-id",
)
]
)

return connection
Expand Down

0 comments on commit c4552ca

Please sign in to comment.