Factory-boy

Latest version: v3.3.1

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

Scan your dependencies

Page 8 of 8

1.1.0

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

*New:*

- Improve the :class:`~factory.SelfAttribute` syntax to fetch sub-attributes using the ``foo.bar`` syntax;
- Add ``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 ``factory.Factory.FACTORY_FOR`` based on class name is now deprecated

1.0.4

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

*New:*

- Improve the algorithm for populating a :class:`~factory.Factory` attributes dict
- Add ``python setup.py test`` command to run the test suite
- Allow custom build functions
- Introduce ``factory.MOGO_BUILD`` build function
- Add support for inheriting from multiple :class:`~factory.Factory`
- Base :class:`~factory.Factory` classes can now be declared abstract through ``factory.Factory.ABSTRACT_FACTORY``.
- Provide :class:`~factory.django.DjangoModelFactory`, whose :class:`~factory.Sequence` counter starts at the next free database id
- Introduce :class:`~factory.SelfAttribute`, a shortcut for ``factory.LazyAttribute(lambda o: o.foo.bar.baz``.

*Bug fix:*

- Handle nested :class:`~factory.SubFactory`
- Share sequence counter between parent and subclasses
- Fix :class:`~factory.SubFactory` / :class:`~factory.Sequence` interference

1.0.2

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

*New:*

- Introduce :class:`~factory.SubFactory`

1.0.1

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

*New:*

- Allow :class:`~factory.Factory` inheritance
- Improve handling of custom build/create functions

*Bug fix:*

- Fix concurrency between :class:`~factory.LazyAttribute` and :class:`~factory.Sequence`

1.0.0

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

*New:*

- First version of factory_boy


Credits
-------

See :doc:`credits`.

.. vim:et:ts=4:sw=4:tw=119:ft=rst:

Page 8 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.