-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat: Use datetime type as time argument, closes #45
- Loading branch information
Showing
5 changed files
with
59 additions
and
28 deletions.
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
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,15 @@ | ||
from datetime import datetime | ||
from unittest import TestCase | ||
|
||
from vortexasdk.api.shared_types import to_ISODate | ||
|
||
|
||
class TestToISODate(TestCase): | ||
def test_to_ISODate(self): | ||
assert to_ISODate(datetime(2018, 12, 31)) == "2018-12-31T00:00:00.000Z" | ||
|
||
def test_to_ISODate_with_time(self): | ||
assert ( | ||
to_ISODate(datetime(2018, 12, 31, 23, 59, 59, 123456)) | ||
== "2018-12-31T23:59:59.123Z" | ||
) |
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