class SerializationTestCase(SettingsTestCase):
    fixtures = ['test_users.json', 'test_moderation.json']
test_settings = 'moderation.tests.settings.generic'

def setUp(self):
    self.user = User.objects.get(username='moderator')
self.profile = UserProfile.objects.get(user__username='moderator')

def test_serialize_of_object(self):
    """Test if object is propertly serialized to json"""
json_field = SerializedObjectField()
self.assertEqual(json_field._serialize(self.profile),
    '[{"pk": 1, "model": "test_app.userprofile", "fields": {"url": "http://www.google.com", "user": 1, "description": "Old description"}}]'
    )
Лучший способ изменить значение «настроек» из тестового примера Python?