def test_update_person_with_user_person_given(self):
     user_infos = {
         'USERNAME': '******',
         'PASSWORD': '******',
         'USER_FGS': '7777777',
     }
     user = get_or_create_user(user_infos)
     person = get_or_create_person(None, 'first_name_2', None)
     person = mdl_signals._create_update_person(user, person, user_infos)
     self.assertEqual(person.user, user)
     self.assertEqual(person.global_id, user_infos.get('USER_FGS'))
     self.assertEqual(person.first_name, 'first_name_2')
Exemple #2
0
 def test_update_person_with_user_person_given(self):
     user_infos = {
         'USERNAME': '******',
         'PASSWORD': '******',
         'USER_FGS': '7777777',
     }
     user = get_or_create_user(user_infos)
     person = get_or_create_person(None, 'first_name_2', None)
     person = mdl_signals._create_update_person(user, person, user_infos)
     self.assertEqual(person.user, user)
     self.assertEqual(person.global_id, user_infos.get('USER_FGS'))
     self.assertEqual(person.first_name, 'first_name_2')
 def test_create_person_from_user(self):
     user_infos = {
         'USERNAME': '******',
         'PASSWORD': '******',
         'USER_FGS': '12345678',
         'USER_FIRST_NAME': 'user1',
         'USER_LAST_NAME': 'User1',
         'USER_EMAIL': '*****@*****.**'
     }
     user = get_or_create_user(user_infos)
     person = mdl_signals._create_update_person(user, None, user_infos)
     assert_person_match_user_infos(self, person, user_infos)
Exemple #4
0
 def test_create_person_from_user(self):
     user_infos = {
         'USERNAME': '******',
         'PASSWORD': '******',
         'USER_FGS': '12345678',
         'USER_FIRST_NAME': 'user1',
         'USER_LAST_NAME': 'User1',
         'USER_EMAIL': '*****@*****.**'
     }
     user = get_or_create_user(user_infos)
     person = mdl_signals._create_update_person(user, None, user_infos)
     assert_person_match_user_infos(self, person, user_infos)