def METHOD_NAME(self):
    yaml = """
        - object: X
          fields:
            xyzzy:
                - object: foo
                    nickname: Foo
                    just_once: True
                    fields:
                        A: 25
        """
    with pytest.raises(exc.DataGenSyntaxError):
        generate(StringIO(yaml))