'Test that a client (logged in) cannot update a preference to null.'

@ddt.data((None,), ('',), ('        ',))
@ddt.unpack
def test_update_preference_to_empty(self, preference_value):

    self.client.login(username=self.user.username, password=TEST_PASSWORD)
    response = self.send_put(self.client, preference_value, expected_status=400)
    self.assertEqual(response.data, {'developer_message': u"Preference    'test_key'    cannot    be    set    to    an    empty    value.", 'user_message': u"Preference    'test_key'    cannot    be    set    to    an    empty    value."})
    response = self.send_get(self.client)
    self.assertEqual(self.test_pref_value, response.data)
