diff --git a/lms/envs/common.py b/lms/envs/common.py index 25be5380445e296f8e93e9e479fc655f19c489eb..5642dd2f837a0f0f91e3d8765f7411eafbcf3c87 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2584,6 +2584,7 @@ INVOICE_PAYMENT_INSTRUCTIONS = "This is where you can\nput directions on how peo COUNTRIES_OVERRIDE = { # Taiwan is specifically not translated to avoid it being translated as "Taiwan (Province of China)" "TW": "Taiwan", + 'XK': _('Kosovo'), } # which access.py permission name to check in order to determine if a course is visible in diff --git a/openedx/core/djangoapps/user_api/tests/test_constants.py b/openedx/core/djangoapps/user_api/tests/test_constants.py index 885cc7913095dda35a6501b98b18b4d9083e4ced..3b6b47af2dcd009b902b41dc7e93241221761a5b 100644 --- a/openedx/core/djangoapps/user_api/tests/test_constants.py +++ b/openedx/core/djangoapps/user_api/tests/test_constants.py @@ -118,6 +118,7 @@ SORTED_COUNTRIES = [ (u"KZ", u"Kazakhstan"), (u"KE", u"Kenya"), (u"KI", u"Kiribati"), + (u"XK", u"Kosovo"), (u"KW", u"Kuwait"), (u"KG", u"Kyrgyzstan"), (u"LA", u"Laos"), diff --git a/openedx/core/djangoapps/user_api/tests/test_views.py b/openedx/core/djangoapps/user_api/tests/test_views.py index c39e277aa1ec9892239e808758e86222257424fa..b67a701d255f420848a63cb9ca2198c232c0c9ce 100644 --- a/openedx/core/djangoapps/user_api/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/tests/test_views.py @@ -1713,6 +1713,15 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase): ) ) + def test_country_overrides(self): + """Test that overridden countries are available in country list.""" + # Retrieve the registration form description + with override_settings(REGISTRATION_EXTRA_FIELDS={"country": "required"}): + response = self.client.get(self.url) + self.assertHttpOK(response) + + self.assertContains(response, 'Kosovo') + @httpretty.activate @ddt.ddt