Newer
Older
'sn': (expected_last,),
}
user = backend.update_user(user, user_attribute, saml_attribute_mapping)
self.assertEqual(user.first_name, expected_first)
self.assertEqual(user.last_name, expected_last)
self.assertTrue(user.name_verified)
self.assertEqual(user.status, constants.user_status.active)
self.assertTrue(user.institutional_id_verified)
with mock.patch("accounts.models.User.save") as mock_save:
# no changes
backend.update_user(user, user_attribute, saml_attribute_mapping)
self.assertEqual(mock_save.call_count, 0)