<s> """<STR_LIT>""" <EOL> import unittest <EOL> from directory_api_users_test_base import DirectoryApiUsersTestBase <EOL> class DirectoryApiGetUsersTest ( DirectoryApiUsersTestBase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( DirectoryApiGetUsersTest , self ) . setUp ( ) <EOL> self . _all_user_count = self . test_users_manager . user_count <EOL> self . _all_users = self . test_users_manager . GetTestUsers ( <EOL> self . primary_domain , max_page = self . _all_user_count ) . get ( '<STR_LIT>' ) <EOL> def testCanGetDomainUsersWithOneUserLimit ( self ) : <EOL> self . assertEqual ( <EOL> self . _api_wrapper . GetDomainUsers ( self . primary_domain , <EOL> basic = False , max_results = <NUM_LIT:1> ) , <EOL> [ self . _all_users [ <NUM_LIT:0> ] ] ) <EOL> def testCanGetAllDomainUsersWithDefaults ( self ) : <EOL> self . assertEqual ( <EOL> self . _api_wrapper . GetDomainUsers ( self . primary_domain , basic = False ) , <EOL> self . _all_users ) <EOL> def testCanGetAllDomainUsersWithSmallPages ( self ) : <EOL> self . assertEqual ( <EOL> self . _api_wrapper . GetDomainUsers ( self . primary_domain , basic = False , <EOL> max_page = self . _all_user_count / <NUM_LIT:3> ) , <EOL> self . _all_users ) <EOL> def testCanGetAllDomainUsersWithLargePages ( self ) : <EOL> self . assertEqual ( <EOL> self . _api_wrapper . GetDomainUsers ( self . primary_domain , basic = False , <EOL> max_page = self . _all_user_count * <NUM_LIT:2> ) , <EOL> self . _all_users ) <EOL> def testCanGetAllDomainUsersBoundaryPageSizes ( self ) : <EOL> self . assertEqual ( <EOL> self . _api_wrapper . GetDomainUsers ( self . primary_domain , basic = False , <EOL> max_page = self . _all_user_count - <NUM_LIT:1> ) , <EOL> self . _all_users ) <EOL> self . assertEqual ( <EOL> self . _api_wrapper . GetDomainUsers ( self . primary_domain , basic = False , <EOL> max_page = self . _all_user_count ) , <EOL> self . _all_users ) <EOL> self . assertEqual ( <EOL> self . _api_wrapper . GetDomainUsers ( self . primary_domain , basic = False , <EOL> max_page = self . _all_user_count + <NUM_LIT:1> ) , <EOL> self . _all_users ) <EOL> def testCanGetSpecifiedCountDomainUsers ( self ) : <EOL> for user_count in [ <NUM_LIT:1> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:10> , <NUM_LIT:11> ] : <EOL> self . assertEqual ( <EOL> self . _api_wrapper . GetDomainUsers ( self . primary_domain , basic = False , <EOL> max_results = user_count ) , <EOL> self . test_users_manager . GetTestUsers ( self . primary_domain , <EOL> max_page = user_count , <EOL> basic = False ) . get ( '<STR_LIT>' ) ) <EOL> def testCanGetDomainUsersWithUnknownDomain ( self ) : <EOL> self . assertEqual ( <EOL> self . _api_wrapper . GetDomainUsers ( self . unknown_domain , basic = False ) , [ ] ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
