-
Notifications
You must be signed in to change notification settings - Fork 10
Update GeoLite Database #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c73c01b
192db54
ca85557
d0bceab
be2f20c
edc8458
b669f06
2978b4a
bf2c271
df9f12e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| from unittest.mock import patch | ||
|
|
||
| import ddt | ||
| from django.conf import settings | ||
| from django.test.utils import override_settings | ||
| from django.utils.timezone import now | ||
| from edx_django_utils.cache import TieredCache | ||
|
|
@@ -196,7 +197,9 @@ def test_handle_enterprise_learner_passing_grade(self): | |
| Test to assert transmit_single_learner_data is called when COURSE_GRADE_NOW_PASSED signal is fired | ||
| """ | ||
| with patch( | ||
| 'integrated_channels.integrated_channel.tasks.transmit_single_learner_data.apply_async', | ||
| 'integrated_channels.integrated_channel.tasks.transmit_single_learner_data.apply_async' | ||
| if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True) else | ||
| 'channel_integrations.integrated_channel.tasks.transmit_single_learner_data.apply_async', | ||
| return_value=None | ||
| ) as mock_task_apply: | ||
| course_key = CourseKey.from_string(self.course_id) | ||
|
|
@@ -218,7 +221,9 @@ def test_handle_enterprise_learner_subsection(self): | |
| Test to assert transmit_subsection_learner_data is called when COURSE_ASSESSMENT_GRADE_CHANGED signal is fired. | ||
| """ | ||
| with patch( | ||
| 'integrated_channels.integrated_channel.tasks.transmit_single_subsection_learner_data.apply_async', | ||
| 'integrated_channels.integrated_channel.tasks.transmit_single_subsection_learner_data.apply_async' | ||
| if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True) else | ||
| 'channel_integrations.integrated_channel.tasks.transmit_single_subsection_learner_data.apply_async', | ||
|
Comment on lines
+224
to
+226
|
||
| return_value=None | ||
| ) as mock_task_apply: | ||
| course_key = CourseKey.from_string(self.course_id) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The conditional expression spans multiple lines but is missing proper parentheses for clarity. While Python allows this syntax, wrapping the entire expression in parentheses would improve readability and make it clear that this is a single argument to
patch().Consider reformatting as: