'Verify the block link redirects to ecommerce checkout if it\'s enabled.'

def test_ecommerce_checkout_redirect(self):

    sku = 'TESTSKU'
    configuration = CommerceConfiguration.objects.create(checkout_on_ecommerce_service=True)
    course = self.create_course_run()
    user = self.create_user()
    course_mode = CourseMode.objects.get(course_id=course.id, mode_slug=CourseMode.VERIFIED)
    course_mode.sku = sku
    course_mode.save()
    CourseEnrollmentFactory(course_id=course.id, user=user, mode=CourseMode.VERIFIED)
    block = VerifiedUpgradeDeadlineDate(course, user)
    self.assertEqual(block.link, '{}?sku={}'.format(configuration.MULTIPLE_ITEMS_BASKET_PAGE_URL, sku))
