Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Remove bok-choy usage #4093

Merged
merged 3 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
from ecommerce.core.constants import (
COUPON_PRODUCT_CLASS_NAME,
COURSE_ENTITLEMENT_PRODUCT_CLASS_NAME,
DONATIONS_FROM_CHECKOUT_TESTS_PRODUCT_TYPE_NAME,
ENROLLMENT_CODE_PRODUCT_CLASS_NAME,
ENTERPRISE_COUPON_ADMIN_ROLE,
ORDER_MANAGER_ROLE,
SEAT_PRODUCT_CLASS_NAME
)
from ecommerce.extensions.basket.constants import EMAIL_OPT_IN_ATTRIBUTE, PURCHASER_BEHALF_ATTRIBUTE
from ecommerce.extensions.catalogue.utils import create_subcategories
from ecommerce.extensions.checkout.signals import BUNDLE
from ecommerce.core.constants import ORDER_MANAGER_ROLE
from ecommerce.core.constants import DONATIONS_FROM_CHECKOUT_TESTS_PRODUCT_TYPE_NAME
from ecommerce.core.constants import ENTERPRISE_COUPON_ADMIN_ROLE


COUPON_CATEGORY_NAME = 'Coupons'

Expand Down
2 changes: 0 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import os
from datetime import datetime



# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

Expand Down
4 changes: 2 additions & 2 deletions ecommerce/extensions/api/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_send_mail_to_mobile_team_with_no_email_specified(self):
email_sender = 'ecommerce.extensions.communication.utils.Dispatcher.dispatch_direct_messages'
msg_t = "Couldn't mail mobile team for change in {}. No email was specified for mobile team in configurations"
msg = msg_t.format(self.course.name)
with LogCapture(logger_name) as utils_logger,\
with LogCapture(logger_name) as utils_logger, \
mock.patch(email_sender) as mock_send_email:

send_mail_to_mobile_team_for_change_in_course(self.course, self.course.seat_products.all())
Expand All @@ -47,7 +47,7 @@ def test_send_mail_to_mobile_team(self):
iap_configs = IAPProcessorConfiguration.get_solo()
iap_configs.mobile_team_email = self.mock_mobile_team_mail
iap_configs.save()
with LogCapture(logger_name) as utils_logger,\
with LogCapture(logger_name) as utils_logger, \
mock.patch(email_sender) as mock_send_email:

send_mail_to_mobile_team_for_change_in_course(self.course, self.course.seat_products.all())
Expand Down
6 changes: 3 additions & 3 deletions ecommerce/extensions/api/v2/views/enterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ def assign(self, request, pk): # pylint: disable=unused-argument
all_uploaded_un_uploaded_files = request.data.pop('template_files', [])
self._validate_email_fields(subject, greeting, closing)
files_with_url = [
{'file_name': file['name'], 'url':file['url']}
{'file_name': file['name'], 'url': file['url']}
for file in all_uploaded_un_uploaded_files
if 'url' in file
]
Expand Down Expand Up @@ -916,7 +916,7 @@ def revoke(self, request, pk): # pylint: disable=unused-argument
self._validate_assignments_data(request.data.get('assignments'))

files_with_url = [
{'file_name': file['name'], 'url':file['url']}
{'file_name': file['name'], 'url': file['url']}
for file in all_uploaded_un_uploaded_files
if 'url' in file
]
Expand Down Expand Up @@ -1006,7 +1006,7 @@ def remind(self, request, pk): # pylint: disable=unused-argument
)

files_with_url = [
{'file_name': file['name'], 'url':file['url']}
{'file_name': file['name'], 'url': file['url']}
for file in all_uploaded_un_uploaded_files
if 'url' in file
]
Expand Down
2 changes: 1 addition & 1 deletion ecommerce/extensions/api/v2/views/orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def _get_enrollment_data(self, enrollment):
if discount_percentage is not None:
if not isinstance(discount_percentage, float) or (discount_percentage < 0.0 or discount_percentage > 100.0):
raise ValidationError('Discount percentage should be a float from 0 to 100.')
return lms_user_id, learner_username, learner_email, course_run_key, mode, discount_percentage,\
return lms_user_id, learner_username, learner_email, course_run_key, mode, discount_percentage, \
sales_force_id, salesforce_opportunity_line_item

def _get_learner_user(self, lms_user_id, learner_username, learner_email):
Expand Down
2 changes: 1 addition & 1 deletion ecommerce/extensions/dashboard/orders/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from unittest import SkipTest, skipIf

import pytest
from bok_choy.browser import browser
from django.contrib.messages import constants as MSG
from django.test import override_settings
from django.urls import reverse
Expand All @@ -13,6 +12,7 @@
from selenium.webdriver.support.wait import WebDriverWait

from ecommerce.extensions.dashboard.orders.views import queryset_orders_for_user
from ecommerce.extensions.dashboard.refunds.tests.browser import browser
from ecommerce.extensions.dashboard.tests import DashboardViewTestMixin
from ecommerce.extensions.fulfillment.signals import SHIPPING_EVENT_NAME
from ecommerce.extensions.fulfillment.status import LINE, ORDER
Expand Down
Loading
Loading