do_update_user_custom_profile_data: Rename to ..._if_changed.

This adds clarity to the fact that the function no longer does
anything if the field values haven't changed.
This commit is contained in:
Mateusz Mandera
2019-10-01 04:22:50 +02:00
committed by Tim Abbott
parent d66cbd2832
commit 4166c901ef
8 changed files with 22 additions and 21 deletions

View File

@@ -2915,7 +2915,7 @@ class TestZulipLDAPUserPopulator(ZulipLDAPTestCase):
with self.settings(AUTH_LDAP_USER_ATTR_MAP={'full_name': 'cn',
'custom_profile_field__birthday': 'birthDate',
'custom_profile_field__phone_number': 'phoneNumber'}):
with mock.patch('zproject.backends.do_update_user_custom_profile_data') as f:
with mock.patch('zproject.backends.do_update_user_custom_profile_data_if_changed') as f:
self.perform_ldap_sync(self.example_user('hamlet'))
f.assert_called_once_with(*expected_call_args)