Skip to content

Commit

Permalink
chore: tests and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
brobro10000 committed May 15, 2024
1 parent 33e8a66 commit 1621db5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions enterprise/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ class EnterpriseCustomerAdmin(DjangoObjectActions, SimpleHistoryAdmin):
'enable_generation_of_api_credentials')
}),
('Recommended default settings for all enterprise customers', {
'fields': ('site', 'customer_type', 'disable_expiry_messaging_for_learner_credit',
'enable_learner_portal','enable_integrated_customer_learner_portal_search',
'fields': ('site', 'customer_type', 'disable_expiry_messaging_for_learner_credit',
'enable_learner_portal', 'enable_integrated_customer_learner_portal_search',
'enable_analytics_screen', 'enable_audit_enrollment',
'enable_audit_data_reporting', 'enable_learner_portal_offers',
'enable_executive_education_2U_fulfillment',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.13 on 2024-05-15 13:09
# Generated by Django 4.2.13 on 2024-05-15 19:14

from django.db import migrations, models

Expand All @@ -13,11 +13,11 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='enterprisecustomer',
name='disable_expiry_messaging_for_learner_credit',
field=models.BooleanField(default=False, help_text='Automatically disabled. If unchecked, learners and admins will not receive email, and modal notifications on expiring learner credit plans.', verbose_name='Disable expiration messaging for learner credit'),
field=models.BooleanField(default=False, help_text='If checked, learners and admins will not receive email, and notifications on expiring learner credit plans.', verbose_name='Disable expiration messaging for learner credit'),
),
migrations.AddField(
model_name='historicalenterprisecustomer',
name='disable_expiry_messaging_for_learner_credit',
field=models.BooleanField(default=False, help_text='Automatically disabled. If unchecked, learners and admins will not receive email, and modal notifications on expiring learner credit plans.', verbose_name='Disable expiration messaging for learner credit'),
field=models.BooleanField(default=False, help_text='If checked, learners and admins will not receive email, and notifications on expiring learner credit plans.', verbose_name='Disable expiration messaging for learner credit'),
),
]
4 changes: 2 additions & 2 deletions enterprise/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ class Meta:
disable_expiry_messaging_for_learner_credit = models.BooleanField(
verbose_name="Disable expiration messaging for learner credit",
default=False,
help_text=_("Automatically disabled. If unchecked, learners and admins will not receive email, "
"and modal notifications on expiring learner credit plans.")
help_text=_("If checked, learners and admins will not receive email, "
"and notifications on expiring learner credit plans.")
)

enable_portal_code_management_screen = models.BooleanField(
Expand Down
6 changes: 6 additions & 0 deletions tests/test_enterprise/api/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,7 @@ class TestEnterpriseCustomerViewSet(BaseTestEnterpriseAPIViews):
'enable_audit_enrollment': False,
'replace_sensitive_sso_username': False, 'enable_portal_code_management_screen': False,
'sync_learner_profile_data': False,
'disable_expiry_messaging_for_learner_credit': False,
'enable_audit_data_reporting': True,
'enable_learner_portal': True,
'enable_learner_portal_offers': False,
Expand Down Expand Up @@ -1267,6 +1268,7 @@ class TestEnterpriseCustomerViewSet(BaseTestEnterpriseAPIViews):
'identity_provider': None, 'enable_audit_enrollment': False,
'replace_sensitive_sso_username': False, 'enable_portal_code_management_screen': False,
'sync_learner_profile_data': False, 'enable_audit_data_reporting': False,
'disable_expiry_messaging_for_learner_credit': False,
'enable_learner_portal': True, 'enable_learner_portal_offers': False,
'enable_portal_learner_credit_management_screen': False,
'enable_executive_education_2U_fulfillment': False,
Expand Down Expand Up @@ -1354,6 +1356,7 @@ class TestEnterpriseCustomerViewSet(BaseTestEnterpriseAPIViews):
'identity_provider': FAKE_UUIDS[0], 'enable_audit_enrollment': False,
'replace_sensitive_sso_username': False, 'enable_portal_code_management_screen': False,
'sync_learner_profile_data': False,
'disable_expiry_messaging_for_learner_credit': False,
'enable_audit_data_reporting': False,
'enable_learner_portal': True,
'enable_learner_portal_offers': False,
Expand Down Expand Up @@ -1428,6 +1431,7 @@ class TestEnterpriseCustomerViewSet(BaseTestEnterpriseAPIViews):
'replace_sensitive_sso_username': False,
'enable_portal_code_management_screen': False,
'sync_learner_profile_data': False,
'disable_expiry_messaging_for_learner_credit': False,
'enable_audit_data_reporting': False,
'enable_learner_portal': True,
'enable_learner_portal_offers': False,
Expand Down Expand Up @@ -1524,6 +1528,7 @@ class TestEnterpriseCustomerViewSet(BaseTestEnterpriseAPIViews):
'enable_audit_enrollment': False,
'replace_sensitive_sso_username': False, 'enable_portal_code_management_screen': False,
'sync_learner_profile_data': False,
'disable_expiry_messaging_for_learner_credit': False,
'enable_audit_data_reporting': False,
'enable_learner_portal': True,
'enable_learner_portal_offers': False,
Expand Down Expand Up @@ -1765,6 +1770,7 @@ def test_enterprise_customer_with_access_to(
'replace_sensitive_sso_username': False,
'enable_portal_code_management_screen': True,
'sync_learner_profile_data': False,
'disable_expiry_messaging_for_learner_credit': False,
'enable_audit_data_reporting': False,
'enable_learner_portal': True,
'enable_learner_portal_offers': False,
Expand Down
1 change: 1 addition & 0 deletions tests/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def setUp(self):
"invite_keys",
"hide_course_original_price",
"site",
"disable_expiry_messaging_for_learner_credit",
"enable_data_sharing_consent",
"enforce_data_sharing_consent",
"enable_audit_enrollment",
Expand Down

0 comments on commit 1621db5

Please sign in to comment.