def METHOD_NAME():
    class Nested(Page):
        class Meta:
            context__foo = 1
    class Root(Page):
        nested = Nested()
    with pytest.raises(AssertionError) as e:
        root = Root().bind(request=None)
        _force_bind_all(root.parts)
    assert str(e.value) == 'The context property is only valid on the root page'