'Test that a client (logged in) cannot create an empty preference.'

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

    self._set_url('new_key')
    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    'new_key'    cannot    be    set    to    an    empty    value.", 'user_message': u"Preference    'new_key'    cannot    be    set    to    an    empty    value."})
    self.send_get(self.client, expected_status=404)
