class OptionalOuter(Model): nested = props.Embed(kind=OptionalNested, optional=True)
class Place(Model): name = props.String() points = props.Embed(kind=Point, optional=True, repeated=True)
class DeepA(Model): child = props.Embed(kind=DeepB)
class DeepC(Model): child = props.Embed(kind=DeepD)
def test_embed_properties_cannot_have_defaults(): # When I try to make an Embed property with a default # Then I should get back a type error with pytest.raises(TypeError): props.Embed(kind=Nested, default=42)
class SplitTest(Model): name = props.String(indexed=True) slug = props.String(indexed=True) variations = props.Embed(kind=Variation, repeated=True)
class Outer(Model): x = props.Float(indexed=True) nested = props.Embed(name="child", kind=Nested)