summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2015-05-07 09:29:18 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2015-05-07 09:32:53 (GMT)
commiteac5d90da849fb171b2cd378130e991363f534e4 (patch)
tree3222630b5140a34133a969a8bf4b3b045d7c2cee /tests
parent1f56211c2fb43c2df5889bf181146415bdda53f5 (diff)
downloaddjango-mellon-eac5d90da849fb171b2cd378130e991363f534e4.zip
django-mellon-eac5d90da849fb171b2cd378130e991363f534e4.tar.gz
django-mellon-eac5d90da849fb171b2cd378130e991363f534e4.tar.bz2
tests: adapt to usernames cut at 30 characters
Diffstat (limited to 'tests')
-rw-r--r--tests/test_default_adapter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_default_adapter.py b/tests/test_default_adapter.py
index 0f910da..e6a6252 100644
--- a/tests/test_default_adapter.py
+++ b/tests/test_default_adapter.py
@@ -21,9 +21,9 @@ saml_attributes = {
def test_format_username(settings):
adapter = DefaultAdapter()
assert adapter.format_username(idp, {}) == None
- assert adapter.format_username(idp, saml_attributes) == 'x'*32 + '@saml'
+ assert adapter.format_username(idp, saml_attributes) == ('x'*32 + '@saml')[:30]
settings.MELLON_USERNAME_TEMPLATE = '{attributes[name_id_content]}'
- assert adapter.format_username(idp, saml_attributes) == 'x'*32
+ assert adapter.format_username(idp, saml_attributes) == ('x'*32)[:30]
settings.MELLON_USERNAME_TEMPLATE = '{attributes[username][0]}'
assert adapter.format_username(idp, saml_attributes) == 'foobar'