@classmethod
    def get_mock_object(cls, context=None, overrides={}):
        context = Context._make(context)
        context._setdefault('memo', set())
        context.memo.add(cls)
        values = {}
        for name, field in cls.fields.items():
            if name in overrides:
                continue
            if getattr(field, 'model_class', None) in context.memo:
                continue
            try:
                values[name] = field.mock(context)
            except MockCreationError as exc:
                raise MockCreationError('%s: %s' % (name, exc.message))
        values.update(overrides)
        return cls(values)
Get a mock object.
dataset/ETHPy150Open schematics/schematics/schematics/models.py/Model.get_mock_object