@@ -457,13 +457,16 @@ def side_effect(key, default=None):
457457 response = self .client .get (self .url )
458458 data = response .json ()
459459
460- # Site-level key translated to top level
460+ common = data ["commonAppConfig" ]
461+ # Site-level keys are translated to top level
461462 self .assertEqual (data ["lmsBaseUrl" ], "https://courses.example.com" ) # noqa: PT009
463+ self .assertEqual (data ["cmsBaseUrl" ], "https://studio.example.com" ) # noqa: PT009
464+ # Site-level keys translated to top level don't appear in commonAppConfig
465+ self .assertNotIn ("LMS_BASE_URL" , common ) # noqa: PT009
466+ self .assertNotIn ("STUDIO_BASE_URL" , common ) # noqa: PT009
462467 # Unmapped MFE_CONFIG keys appear in commonAppConfig (not at the top level)
463468 self .assertNotIn ("CREDENTIALS_BASE_URL" , data ) # noqa: PT009
464- common = data ["commonAppConfig" ]
465469 self .assertEqual (common ["CREDENTIALS_BASE_URL" ], "https://credentials.example.com" ) # noqa: PT009
466- self .assertEqual (common ["STUDIO_BASE_URL" ], "https://studio.example.com" ) # noqa: PT009
467470 # Legacy config keys also appear in commonAppConfig
468471 for legacy_key in default_legacy_config :
469472 self .assertIn (legacy_key , common ) # noqa: PT009
@@ -609,12 +612,13 @@ def side_effect(key, default=None):
609612 response = self .client .get (self .url )
610613 data = response .json ()
611614
612- # Site-level key is promoted to the top level
615+ # Site-level keys are promoted to the top level
613616 self .assertEqual (data ["lmsBaseUrl" ], "https://courses.example.com" ) # noqa: PT009
617+ self .assertEqual (data ["cmsBaseUrl" ], "https://studio.example.com" ) # noqa: PT009
614618 # Unmapped keys are preserved in commonAppConfig
615619 common = data ["commonAppConfig" ]
616620 self .assertEqual (common ["CREDENTIALS_BASE_URL" ], "https://credentials.example.com" ) # noqa: PT009
617- self .assertEqual ( common [ "STUDIO_BASE_URL" ], "https://studio.example.com" ) # noqa: PT009
621+ self .assertNotIn ( "STUDIO_BASE_URL" , common ) # noqa: PT009
618622
619623 @patch ("lms.djangoapps.mfe_config_api.views.get_legacy_config_overrides" , return_value = {})
620624 @patch ("lms.djangoapps.mfe_config_api.views.configuration_helpers" )
0 commit comments