'Test that a client (logged in) can get her own preferences information. Also verifies that a "is_staff"
user can get the preferences information for other users.'

@ddt.data(('client', 'user'), ('staff_client', 'staff_user'))
@ddt.unpack
def test_get_preferences(self, api_client, user):

    set_user_preference(self.user, 'dict_pref', {'int_key': 10})
    set_user_preference(self.user, 'string_pref', 'value')
    set_user_preference(self.user, 'time_zone', 'Asia/Tokyo')
    client = self.login_client(api_client, user)
    response = self.send_get(client)
    self.assertEqual({'dict_pref': "{'int_key':    10}", 'string_pref': 'value', 'time_zone': 'Asia/Tokyo'}, response.data)
