-
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35058 from dimagi/jc/fix-case-sensitive-admin-emails
Make enterprise admin match case insensitive
- Loading branch information
Showing
2 changed files
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
from django.core import mail | ||
from django.db import models | ||
from django.test import SimpleTestCase | ||
|
||
from unittest import mock | ||
|
||
|
@@ -343,3 +344,9 @@ def test_unset_autopay(self, fake_customer): | |
self.assertEqual(self.fake_card.metadata, {"auto_pay_{}".format(self.billing_account.id): 'False'}) | ||
self.assertIsNone(self.billing_account.auto_pay_user) | ||
self.assertFalse(self.billing_account.auto_pay_enabled) | ||
|
||
|
||
class SimpleBillingAccountTest(SimpleTestCase): | ||
def test_has_enterprise_admin_does_case_insensitive_match(self): | ||
account = BillingAccount(is_customer_billing_account=True, enterprise_admin_emails=['[email protected]']) | ||
self.assertTrue(account.has_enterprise_admin('[email protected]')) |