'Test that a client (logged in) can update her own preferences information.'

def test_update_preferences(self):

    set_user_preference(self.user, 'dict_pref', {'int_key': 10})
    set_user_preference(self.user, 'string_pref', 'value')
    set_user_preference(self.user, 'extra_pref', 'extra_value')
    set_user_preference(self.user, 'time_zone', 'Asia/Macau')
    self.client.login(username=self.user.username, password=TEST_PASSWORD)
    self.send_patch(self.client, {'string_pref': 'updated_value', 'new_pref': 'new_value', 'extra_pref': None, 'time_zone': 'Europe/London'}, expected_status=204)
    response = self.send_get(self.client)
    expected_preferences = {'dict_pref': "{'int_key':    10}", 'string_pref': 'updated_value', 'new_pref': 'new_value', 'time_zone': 'Europe/London'}
    self.assertEqual(expected_preferences, response.data)
