-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from dynatrace import Dynatrace | ||
|
||
|
||
def test_parse_multiple_date_formats(dt: Dynatrace): | ||
""" | ||
The API can currently return two different date formats. | ||
If a token is created exactly at 0, then the millisecond portion is not returned by the API. | ||
E.g., 2025-01-19T21:36:02.000Z will be returned as 2025-01-19T21:36:02Z by API. | ||
This test ensures that both are parsed correctly. | ||
""" | ||
tokens = dt.tokens.list() | ||
assert len(tokens) == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"totalCount": 2, "pageSize": 200, "apiTokens": [{"id": "dt0c01.34ILWD2EUD4ZYZG3LH7D2358", "name": "Without ms in timestamp", "enabled": true, "owner": "TestOwner", "creationDate": "2025-01-20T21:37:02Z"}, {"id": "dt0c01.SZQBU44KW2NIOICNL6YZ4354", "name": "With ms in timestamp", "enabled": true, "owner": "TestOwner", "creationDate": "2025-01-19T21:36:02.999Z"}]} |