'Test that a client (logged in) receives appropriate errors for a bad request.'

def test_update_preferences_bad_request(self):

    self.client.login(username=self.user.username, password=TEST_PASSWORD)
    response = self.send_patch(self.client, 'non_dict_request', expected_status=400)
    self.assertEqual(response.data, {'developer_message': u'No    data    provided    for    user    preference    update', 'user_message': u'No    data    provided    for    user    preference    update'})
    response = self.send_patch(self.client, {}, expected_status=400)
    self.assertEqual(response.data, {'developer_message': u'No    data    provided    for    user    preference    update', 'user_message': u'No    data    provided    for    user    preference    update'})
