Gérer la fin de scolarité #9

Merged
champeno merged 23 commits from Evarin/archicubes into master 2018-09-30 00:03:27 +02:00
Showing only changes of commit a812a43a2c - Show all commits

View file

@ -166,13 +166,15 @@ class LongTermClipperTests(CASTestCase):
def _setup_ldap(self, promo=12, username="test"): def _setup_ldap(self, promo=12, username="test"):
try: try:
buid = six.binary_type(username, 'utf-8') buid = six.binary_type(username, 'utf-8')
home = six.binary_type('/users/%d/phy/test/' % promo, 'utf-8')
except TypeError: except TypeError:
buid = six.binary_type(username) buid = six.binary_type(username)
home = six.binary_type('/users/%d/phy/test/' % promo)
_mock_ldap.directory['dc=spi,dc=ens,dc=fr'] = { _mock_ldap.directory['dc=spi,dc=ens,dc=fr'] = {
'uid': [buid], 'uid': [buid],
'cn': [b'John Smith'], 'cn': [b'John Smith'],
'mailRoutingAddress': [b'test@clipper.ens.fr'], 'mailRoutingAddress': [b'test@clipper.ens.fr'],
'homeDirectory': [bytes('/users/%d/phy/test/' % promo)], 'homeDirectory': [home],
} }
def _count_ldap_queries(self): def _count_ldap_queries(self):