Merge pull request #21296 from edx/BOM-78

BOM-78
This commit is contained in:
Ayub
2019-08-06 18:49:19 +05:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -69,7 +69,7 @@ class RegistrationFactory(DjangoModelFactory):
model = Registration
user = None
activation_key = uuid4().hex.decode('ascii')
activation_key = six.text_type(uuid4().hex)
class UserFactory(DjangoModelFactory):

View File

@@ -78,7 +78,7 @@ class BasketsViewTests(EnrollmentEventTestMixin, UserMixin, ModuleStoreTestCase)
# TODO Verify this is the best method to create CourseMode objects.
# TODO Find/create constants for the modes.
for mode in [CourseMode.HONOR, CourseMode.VERIFIED, CourseMode.AUDIT]:
sku_string = uuid4().hex.decode('ascii')
sku_string = six.text_type(uuid4().hex)
CourseModeFactory.create(
course_id=self.course.id,
mode_slug=mode,
@@ -200,7 +200,7 @@ class BasketsViewTests(EnrollmentEventTestMixin, UserMixin, ModuleStoreTestCase)
CourseMode.objects.filter(course_id=self.course.id).delete()
mode = CourseMode.NO_ID_PROFESSIONAL_MODE
sku_string = uuid4().hex.decode('ascii')
sku_string = six.text_type(uuid4().hex)
CourseModeFactory.create(course_id=self.course.id, mode_slug=mode, mode_display_name=mode,
sku=sku_string, bulk_sku='BULK-{}'.format(sku_string))
response = self._post_to_view()

View File

@@ -1255,7 +1255,7 @@ class TestCreateOrderEcommerceService(CheckoutTestMixin, ModuleStoreTestCase):
def make_sku(self):
""" Checkout is handled by the ecommerce service when the course mode's sku is nonempty. """
return uuid4().hex.decode('ascii')
return six.text_type(uuid4().hex)
def _get_checkout_args(self, patched_create_order):
""" Assuming patched_create_order was called, return a mapping containing the call arguments."""