def test_error_messages(self):
        for kwargs, expected in (
                ({'simple': 42}, EmbeddedModel),
                ({'simple_untyped': 42}, models.Model),
                ({'typed_list': [EmbeddedModel()]}, SetModel)):
            self.assertRaisesRegexp(
                TypeError, expected % "Expected instance of type %r.",
                EmbeddedModelFieldModel(**kwargs).save)
dataset/ETHPy150Open django-nonrel/djangotoolbox/djangotoolbox/tests.py/EmbeddedModelFieldTest.test_error_messages/swapped operands of `%`