Changeset - e0735ea41d8d
[Not reviewed]
default
0 1 0
Mads Kiilerich - 9 years ago 2016-06-29 16:52:07
madski@unity3d.com
tests: fix Python 2.6 compatibility in string formatting

Python 2.6 would fail with:
ValueError: zero length field name in format
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/other/test_auth_ldap.py
Show inline comments
 
@@ -33,11 +33,11 @@ def test_update_user_attributes_from_lda
 

	
 
    # Arrange test user.
 
    uniqifier = uuid.uuid4()
 
    username = 'test-user-{}'.format(uniqifier)
 
    username = 'test-user-{0}'.format(uniqifier)
 
    assert User.get_by_username(username) is None
 
    user_input = dict(username='test-user-{}'.format(uniqifier),
 
    user_input = dict(username='test-user-{0}'.format(uniqifier),
 
                      password='spam password',
 
                      email='spam-email-{}'.format(uniqifier),
 
                      email='spam-email-{0}'.format(uniqifier),
 
                      firstname='spam first name',
 
                      lastname='spam last name',
 
                      active=True,
 
@@ -70,7 +70,7 @@ def test_init_user_attributes_from_ldap(
 

	
 
    # Arrange test user.
 
    uniqifier = uuid.uuid4()
 
    username = 'test-user-{}'.format(uniqifier)
 
    username = 'test-user-{0}'.format(uniqifier)
 
    assert User.get_by_username(username) is None
 

	
 
    # Arrange LDAP auth.
 
@@ -113,7 +113,7 @@ def test_init_user_attributes_from_ldap_
 

	
 
    # Arrange test user.
 
    uniqifier = uuid.uuid4()
 
    username = 'test-user-{}'.format(uniqifier)
 
    username = 'test-user-{0}'.format(uniqifier)
 
    assert User.get_by_username(username) is None
 

	
 
    # Arrange LDAP auth.
0 comments (0 inline, 0 general)