Esempio n. 1
0
 def testFindUsers(self):
     COLLECTION_USERS.insert(TEST_OBJ)
     RESULT = findUsers(TEST_NUMBER, TEST_OFFSET, TEST_LOGIN_SUBSTRING)[0]
     self.assertEquals(RESULT[LOGIN], VALID_RESULT)
     COLLECTION_USERS.insert(TEST_OBJ_1)
     COLLECTION_USERS.insert(TEST_OBJ_2)
     COLLECTION_USERS.insert(TEST_OBJ_3)
     COLLECTION_USERS.insert(TEST_OBJ_4)
     RESULT = findUsers(
         TEST_NUMBER_10,
         TEST_OFFSET,
         TEST_LOGIN_SUBSTRING_TEST)
     self.assertTrue(isSorted(RESULT, LOGIN))
Esempio n. 2
0
 def get(self):
     params = UserListResourceParser.parseGetParameters()
     users = findUsers(params[GET_ARGS_NUMBER], params[GET_ARGS_OFFSET],
                       params[GET_ARGS_LOGIN])
     return users
Esempio n. 3
0
 def testFindUsers(self):
     COLLECTION_USERS.insert(TEST_OBJ)
     RESULT = findUsers(TEST_NUMBER, TEST_OFFSET, TEST_LOGIN_SUBSTRING)[0]
     self.assertEquals(RESULT[LOGIN], VALID_RESULT)
Esempio n. 4
0
 def get(self):
     params = UserListResourceParser.parseGetParameters()
     users = findUsers(params[GET_ARGS_NUMBER], params[GET_ARGS_OFFSET],
                       params[GET_ARGS_LOGIN])
     return users