Factory-boy

Latest version: v3.3.0

Safety actively analyzes 630052 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 8

1.1.5

------------------

*Bug fix:*

- Fix :class:`~factory.PostGenerationDeclaration` and derived classes.

1.1.4

------------------

*New:*

- Add :meth:`~factory.use_strategy` decorator to override a
:class:`~factory.Factory`'s default strategy
- Improve test running (tox, python2.6/2.7)
- Introduce :class:`~factory.PostGeneration` and
:class:`~factory.RelatedFactory`

1.1.3

------------------

*Bug fix:*

- Fix packaging rules

1.1.2

------------------

*New:*

- Add :class:`~factory.Iterator` and :class:`~factory.InfiniteIterator` for :class:`~factory.Factory` attribute declarations.
- Provide :func:`~factory.Factory.generate` and :func:`~factory.Factory.simple_generate`, that allow specifying the instantiation strategy directly.
Also provides :func:`~factory.Factory.generate_batch` and :func:`~factory.Factory.simple_generate_batch`.

1.1.1

------------------

*New:*

- Add :func:`~factory.Factory.build_batch`, :func:`~factory.Factory.create_batch` and :func:`~factory.Factory.stub_batch`, to instantiate factories in batch

1.1.0

------------------

*New:*

- Improve the :class:`~factory.SelfAttribute` syntax to fetch sub-attributes using the ``foo.bar`` syntax;
- Add :class:`~factory.ContainerAttribute` to fetch attributes from the container of a :class:`~factory.SubFactory`.
- Provide the :func:`~factory.make_factory` helper: ``MyClassFactory = make_factory(MyClass, x=3, y=4)``
- Add :func:`~factory.build`, :func:`~factory.create`, :func:`~factory.stub` helpers

*Bug fix:*

- Allow ``classmethod``/``staticmethod`` on factories

*Deprecation:*

- Auto-discovery of :attr:`~factory.Factory.FACTORY_FOR` based on class name is now deprecated

Page 7 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.