This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use course_overview object in course_published dump
test: add test for course_published changes chore: quality fixes test: add test for get_queryset changes in sinks test: add test for should_dump_item in course_published chore: use invalid emails chore: quality fixes
- Loading branch information
Showing
6 changed files
with
81 additions
and
33 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
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,20 @@ | ||
""" | ||
Test the external_id_sink module. | ||
""" | ||
|
||
from unittest.mock import patch | ||
|
||
from event_sink_clickhouse.sinks.external_id_sink import ExternalIdSink | ||
|
||
|
||
@patch("event_sink_clickhouse.sinks.external_id_sink.ModelBaseSink.get_queryset") | ||
def test_get_queryset(mock_get_queryset): | ||
""" | ||
Test the get_queryset method. | ||
""" | ||
sink = ExternalIdSink(None, None) | ||
|
||
sink.get_queryset() | ||
|
||
mock_get_queryset.assert_called_once_with(None) | ||
mock_get_queryset.return_value.select_related.assert_called_once_with("user", "external_id_type") |
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,20 @@ | ||
""" | ||
Test the external_id_sink module. | ||
""" | ||
|
||
from unittest.mock import patch | ||
|
||
from event_sink_clickhouse.sinks.user_profile_sink import UserProfileSink | ||
|
||
|
||
@patch("event_sink_clickhouse.sinks.external_id_sink.ModelBaseSink.get_queryset") | ||
def test_get_queryset(mock_get_queryset): | ||
""" | ||
Test the get_queryset method. | ||
""" | ||
sink = UserProfileSink(None, None) | ||
|
||
sink.get_queryset() | ||
|
||
mock_get_queryset.assert_called_once_with(None) | ||
mock_get_queryset.return_value.select_related.assert_called_once_with("user") |