-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
7 changed files
with
257 additions
and
124 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[report] | ||
omit = | ||
*/tests/* |
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 |
---|---|---|
@@ -1,26 +1 @@ | ||
"""Contains the utility functions for testing.""" | ||
|
||
from datetime import UTC, datetime | ||
|
||
from ytnoti import Channel, Timestamp, Video | ||
|
||
|
||
def get_channel() -> Channel: | ||
"""Create a mock channel.""" | ||
return Channel( | ||
id="mock_channel_id", | ||
name="Mock Channel", | ||
url="https://www.youtube.com/channel/mock_channel") | ||
|
||
def get_video() -> Video: | ||
"""Create a mock video.""" | ||
return Video( | ||
id="mock_video_id", | ||
title="Mock Video", | ||
url="https://www.youtube.com/watch?v=mock_video", | ||
timestamp=Timestamp( | ||
published=datetime(2023, 1, 1, 12, 0, 0, tzinfo=UTC), | ||
updated=datetime(2023, 1, 1, 13, 0, 0, tzinfo=UTC) | ||
), | ||
channel=get_channel() | ||
) | ||
"""Contains tests for history class.""" |
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
Oops, something went wrong.