Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Jul 11, 2024
1 parent f5a6c62 commit dd5ea48
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions projectroles/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4575,7 +4575,11 @@ def setUp(self):
kwargs={'secret': self.invite.secret},
)

@override_settings(ENABLE_LDAP=True, AUTH_LDAP_USERNAME_DOMAIN=LDAP_DOMAIN)
@override_settings(
ENABLE_LDAP=True,
AUTH_LDAP_USERNAME_DOMAIN=LDAP_DOMAIN,
AUTH_LDAP_DOMAIN_PRINTABLE='EXAMPLE',
)
def test_get_wrong_type_local(self):
"""Test ProjectInviteProcessLDAPView GET with local invite"""
self.invite.email = '[email protected]'
Expand Down Expand Up @@ -4628,7 +4632,11 @@ def test_get(self):
self.assertEqual(email, self.invite.email)
self.assertEqual(username, self.invite.email.split('@')[0])

@override_settings(ENABLE_LDAP=True, AUTH_LDAP_USERNAME_DOMAIN=LDAP_DOMAIN)
@override_settings(
ENABLE_LDAP=True,
AUTH_LDAP_USERNAME_DOMAIN=LDAP_DOMAIN,
AUTH_LDAP_DOMAIN_PRINTABLE='EXAMPLE',
)
def test_get_wrong_type_ldap(self):
"""Test ProjectInviteProcessLocalView GET with LDAP invite"""
self.assertEqual(ProjectInvite.objects.filter(active=True).count(), 1)
Expand Down

0 comments on commit dd5ea48

Please sign in to comment.