def assertSavedObject(self, obj, language, **kwargs):
        self.assertEqual(language, kwargs.pop('language_code', language),
                         'Test error: mismatching language and language_code.')
        for key, value in kwargs.items():
            self.assertEqual(getattr(obj, key), value)
        self.assertEqual(obj.language_code, language)
        self.assertCountEqual(
            obj.__class__.objects.language(language).filter(**kwargs).values_list('pk', flat=True),
            [obj.pk]
        )

# method was renamed from assertItemsEqual in Python 3
Does the commit itself and resets the dirty flag.
dataset/ETHPy150Open KristianOellegaard/django-hvad/hvad/test_utils/testcase.py/HvadTestCase.assertSavedObject--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/db/backends/__init__.py/BaseDatabaseWrapper.commit