コード例 #1
0
ファイル: test_sim.py プロジェクト: nunb/calendarserver
 def test_createUser(self):
     """
     Subsequent calls to L{CalendarClientSimulator._createUser}
     with different user numbers return user details from different
     directory records.
     """
     calsim = CalendarClientSimulator(
         [self._user('alice'), self._user('bob'), self._user('carol')],
         Populator(None), None, None, 'http://example.org:1234/', None, None)
     users = sorted([
         calsim._createUser(0)[0],
         calsim._createUser(1)[0],
         calsim._createUser(2)[0],
     ])
     self.assertEqual(['alice', 'bob', 'carol'], users)
コード例 #2
0
ファイル: test_sim.py プロジェクト: gingerkaan/serveros
 def test_createUser(self):
     """
     Subsequent calls to L{CalendarClientSimulator._createUser}
     with different user numbers return user details from different
     directory records.
     """
     calsim = CalendarClientSimulator(
         [self._user('alice'), self._user('bob'), self._user('carol')],
         Populator(None), None, None, 'http://example.org:1234/', None, None)
     users = sorted([
         calsim._createUser(0)[0],
         calsim._createUser(1)[0],
         calsim._createUser(2)[0],
     ])
     self.assertEqual(['alice', 'bob', 'carol'], users)
コード例 #3
0
ファイル: test_sim.py プロジェクト: nunb/calendarserver
 def test_createUserAuthInfo(self):
     """
     The auth handler returned by L{CalendarClientSimulator._createUser}
     includes the password taken from user's directory record.
     """
     calsim = CalendarClientSimulator(
         [self._user('alice')],
         Populator(None), None, None, 'http://example.org:1234/', None, None)
     user, auth = calsim._createUser(0)
     self.assertEqual(
         auth['basic'].passwd.find_user_password('Test Realm', 'http://example.org:1234/')[1],
         'password-' + user)
     self.assertEqual(
         auth['digest'].passwd.find_user_password('Test Realm', 'http://example.org:1234/')[1],
         'password-' + user)
コード例 #4
0
ファイル: test_sim.py プロジェクト: gingerkaan/serveros
 def test_createUserAuthInfo(self):
     """
     The auth handler returned by L{CalendarClientSimulator._createUser}
     includes the password taken from user's directory record.
     """
     calsim = CalendarClientSimulator(
         [self._user('alice')],
         Populator(None), None, None, 'http://example.org:1234/', None, None)
     user, auth = calsim._createUser(0)
     self.assertEqual(
         auth['basic'].passwd.find_user_password('Test Realm', 'http://example.org:1234/')[1],
         'password-' + user)
     self.assertEqual(
         auth['digest'].passwd.find_user_password('Test Realm', 'http://example.org:1234/')[1],
         'password-' + user)