Ejemplo n.º 1
0
from councilconnect import CouncilConnect
from usermanager import UserManager
import os

import usermanager

if __name__ == "__main__":

    #CouncilConnect.url('https://councils.clark.edu/')  # The trailing slash is required
    #CouncilConnect.token(os.getenv('CCtoken'))  # Will require explanation in the docs
    CouncilConnect.alert_recipient(
        '*****@*****.**')  # where failure alerts will be sent
    CouncilConnect.init_session()  # Gets things ready. MUST be called.

    #user = UserManager.search_person_id('@!!$testosteroni')
    #users = UserManager.retrieve_users()

    UserManager.search_person_id('@!!$testosteroni')
 def test_search_person_id(self):
     # Person ID of Ryan Paulos
     ret = UserManager.search_person_id(
         '1EF69564-83D7-463A-B3F7-F1CFAA076554')
     self.assertEqual(ret['id'], 12)
 def test_delete_person(self):
     # user is created
     UserManager.delete_user(3081)
     search = UserManager.search_person_id(3081)
     self.assertEqual(None, search)
 def test_user_edit_login(self):
     person = copy.deepcopy(TestUser.user)
     ret = person.edit_login('testosteroniIsKing')
     self.assertEqual(True, ret)
     tes = UserManager.search_person_id('@!!$testosteroni')
     self.assertEqual(tes['sis_login_id'], 'testosteroniIsKing')