Merge pull request #22851 from edx/juliasq/rename_site_configuration_siteconfiguration_values_2
Rename values in SiteConfiguration (2/3)
This commit is contained in:
@@ -465,7 +465,7 @@ class AllowedAuthUserForm(forms.ModelForm):
|
||||
if not allowed_site_email_domain:
|
||||
raise forms.ValidationError(
|
||||
_("Please add a key/value 'THIRD_PARTY_AUTH_ONLY_DOMAIN/{site_email_domain}' in SiteConfiguration "
|
||||
"model's values field.")
|
||||
"model's site_values field.")
|
||||
)
|
||||
elif email_domain != allowed_site_email_domain:
|
||||
raise forms.ValidationError(
|
||||
|
||||
@@ -454,7 +454,7 @@ class AllowedAuthUserFormTest(SiteMixin, TestCase):
|
||||
|
||||
def _update_site_configuration(self):
|
||||
""" Updates the site's configuration """
|
||||
self.site.configuration.values = {'THIRD_PARTY_AUTH_ONLY_DOMAIN': self.email_domain_name}
|
||||
self.site.configuration.site_values = {'THIRD_PARTY_AUTH_ONLY_DOMAIN': self.email_domain_name}
|
||||
self.site.configuration.save()
|
||||
|
||||
def _assert_form(self, site, email, is_valid_form=False):
|
||||
@@ -480,7 +480,7 @@ class AllowedAuthUserFormTest(SiteMixin, TestCase):
|
||||
self.assertEqual(
|
||||
error,
|
||||
"Please add a key/value 'THIRD_PARTY_AUTH_ONLY_DOMAIN/{site_email_domain}' in SiteConfiguration "
|
||||
"model's values field."
|
||||
"model's site_values field."
|
||||
)
|
||||
|
||||
def test_form_with_invalid_domain_name(self):
|
||||
|
||||
@@ -222,7 +222,9 @@ class MigrationTests(TestCase):
|
||||
Tests for migrations.
|
||||
"""
|
||||
|
||||
@unittest.skip("Need to skip as part of renaming a field in schedules app. This will be unskipped in DE-1825")
|
||||
@unittest.skip(
|
||||
"Need to skip as part of renaming a field in schedules app. This will be unskipped in DE-1825. ALSO need to skip as part of renaming a field in the site_configuration app. This will be unskipped in DENG-18."
|
||||
)
|
||||
@override_settings(MIGRATION_MODULES={})
|
||||
def test_migrations_are_in_sync(self):
|
||||
"""
|
||||
@@ -237,6 +239,6 @@ class MigrationTests(TestCase):
|
||||
release afterwards, this test doesn't fail.
|
||||
"""
|
||||
out = StringIO()
|
||||
call_command('makemigrations', dry_run=True, verbosity=3, stdout=out)
|
||||
call_command("makemigrations", dry_run=True, verbosity=3, stdout=out)
|
||||
output = out.getvalue()
|
||||
self.assertIn('No changes detected', output)
|
||||
self.assertIn("No changes detected", output)
|
||||
|
||||
Reference in New Issue
Block a user