Update settings for edx-enterprise (v0.19.1) configurations.
This commit is contained in:
@@ -7,7 +7,7 @@ import logging
|
||||
|
||||
try:
|
||||
from enterprise.models import EnterpriseCustomer
|
||||
from enterprise import api as enterprise_api
|
||||
from enterprise import utils as enterprise_utils
|
||||
from enterprise.tpa_pipeline import (
|
||||
active_provider_requests_data_sharing,
|
||||
active_provider_enforces_data_sharing,
|
||||
@@ -142,9 +142,9 @@ def get_enterprise_customer_logo_url(request):
|
||||
ec_uuid = parameter.get('ec_uuid', None)
|
||||
|
||||
if provider_id:
|
||||
branding_info = enterprise_api.get_enterprise_branding_info_by_provider_id(provider_id=provider_id)
|
||||
branding_info = enterprise_utils.get_enterprise_branding_info_by_provider_id(identity_provider_id=provider_id)
|
||||
elif ec_uuid:
|
||||
branding_info = enterprise_api.get_enterprise_branding_info_by_ec_uuid(ec_uuid=ec_uuid)
|
||||
branding_info = enterprise_utils.get_enterprise_branding_info_by_ec_uuid(ec_uuid=ec_uuid)
|
||||
|
||||
logo_url = None
|
||||
if branding_info and branding_info.logo:
|
||||
|
||||
@@ -177,12 +177,12 @@ class TestEnterpriseHelpers(unittest.TestCase):
|
||||
)
|
||||
|
||||
set_enterprise_branding_filter_param(request, provider_id=None)
|
||||
with mock.patch('enterprise.api.get_enterprise_branding_info_by_ec_uuid', return_value=branding_info):
|
||||
with mock.patch('enterprise.utils.get_enterprise_branding_info_by_ec_uuid', return_value=branding_info):
|
||||
logo_url = get_enterprise_customer_logo_url(request)
|
||||
self.assertEqual(logo_url, '/test/image.png')
|
||||
|
||||
set_enterprise_branding_filter_param(request, provider_id)
|
||||
with mock.patch('enterprise.api.get_enterprise_branding_info_by_provider_id', return_value=branding_info):
|
||||
with mock.patch('enterprise.utils.get_enterprise_branding_info_by_provider_id', return_value=branding_info):
|
||||
logo_url = get_enterprise_customer_logo_url(request)
|
||||
self.assertEqual(logo_url, '/test/image.png')
|
||||
|
||||
@@ -195,7 +195,7 @@ class TestEnterpriseHelpers(unittest.TestCase):
|
||||
branding_info = mock.Mock()
|
||||
|
||||
set_enterprise_branding_filter_param(request, 'test-idp')
|
||||
with mock.patch('enterprise.api.get_enterprise_branding_info_by_provider_id', return_value=branding_info):
|
||||
with mock.patch('enterprise.utils.get_enterprise_branding_info_by_provider_id', return_value=branding_info):
|
||||
logo_url = get_enterprise_customer_logo_url(request)
|
||||
self.assertEqual(logo_url, None)
|
||||
|
||||
@@ -209,6 +209,6 @@ class TestEnterpriseHelpers(unittest.TestCase):
|
||||
branding_info = mock.Mock()
|
||||
|
||||
set_enterprise_branding_filter_param(request, provider_id=None)
|
||||
with mock.patch('enterprise.api.get_enterprise_branding_info_by_provider_id', return_value=branding_info):
|
||||
with mock.patch('enterprise.utils.get_enterprise_branding_info_by_provider_id', return_value=branding_info):
|
||||
logo_url = get_enterprise_customer_logo_url(request)
|
||||
self.assertEqual(logo_url, None)
|
||||
|
||||
Reference in New Issue
Block a user