django-autofixture-squad


Namedjango-autofixture-squad JSON
Version 0.12.6 PyPI version JSON
download
home_pagehttps://github.com/squadrun/django-autofixture
SummaryProvides tools to auto generate test data.
upload_time2023-08-04 10:28:44
maintainer
docs_urlNone
authorGregor Müllegger
requires_python
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ==================
django-autofixture
==================

|build| |package|

This app aims to provide a simple way of loading masses of randomly generated
test data into your development database. You can use a management command to
load test data through command line.

It is named *autofixture* because it is based on  django's fixtures. Without
*autofixture* you add test data through the admin to see how the non-static
pages on your site look. You export data by using ``dumpdata`` to
send it to your colleagues or to preserve it before you make a ``manage.py
reset app`` and so on. As your site grows in complexity the process of adding
and re-adding data becomes more and more annoying.

This is where autofixtures will help!


Requirements
============

* We require and support Django 1.4 to 1.9


Installation
============

You must make the ``autofixture`` package available on your python path.
Either drop it into your project directory or install it from the python
package index with ``pip install django-autofixture``. You can also use
``easy_install django-autofixture`` if you don't have pip available.

To use the management command you must add ``'autofixture'`` to the
``INSTALLED_APPS`` setting in your django settings file. You don't need to do
this if you want to use the ``autofixture`` package only as library.


Management command
==================

The ``loadtestdata`` accepts the following syntax::

    python manage.py loadtestdata [options] app.Model:# [app.Model:# ...]

It's nearly self explanatory. Supply names of models, prefixed with its app
name. After that, place a colon and tell the command how many objects you want
to create. Here is an example of how to create three categories and twenty
entries for your blogging app::

    python manage.py loadtestdata blog.Category:3 blog.Entry:20

Voila! You have ready-to-use testing data populated to your database. The
model fields are filled with data by producing randomly generated values
depending on the type of the field. E.g. text fields are filled with lorem
ipsum dummies, date fields are populated with random dates from the last
year etc.

There are a few command line options available. Mainly to control the
behavior of related fields. If foreingkey or many to many fields should be
populated with existing data or if the related models are also generated on
the fly. Please have a look at the help page of the command for more
information::

    python manage.py help loadtestdata


Using autofixtures as a tool for unittests
==========================================

Testing the behavior of complex models has always bugged me. Sometimes models
have many restrictions or many related objects which they depend on. One
solution would be to use traditional fixtures dumped from your production
database. But while in development when database schemes are changing
frequently, it can be time consuming and sometimes difficult to deep track of
changes and what each dump contains.

Autofixtures to the rescue!

Let's start with the basics. We create an ``AutoFixture`` instance for the
``Entry`` model and tell it to create ten model instances::

    >>> from autofixture import AutoFixture
    >>> fixture = AutoFixture(Entry)
    >>> entries = fixture.create(10)

Here are further examples for newer developers.

I have a ``Listing`` model and I want it populated with 10 objects.

::

    >>> from autofixture import AutoFixture
    >>> fixture = AutoFixture(Listing)
    >>> entries = fixture.create(10)

Here I've added field values which allow you to default a field to a certain
value rather than the random entries supplied by *autofixture*.

Generic Example including field_values:

::

    from <yourapp>.models import <your model>
    fixture = AutoFixture(<your model>, field_values={'<your field name>':<value>})

Specific example::

    from main.models import Listing
    fixture = AutoFixture(Listing, field_values={'needed_players': randint(2,10)})
    entries=fixture.create(30)

In the above, I wanted the ``'needed_players'`` (in the Session model) to have
only numbers between 2 and 10, but I could have put ``{'needed_players': 5}``
if I had wanted all ``'needed_players'`` instances to be ``5``.

========================================

Now you can play around and test your blog entries. By default, dependencies
of foreignkeys and many to many relations are populated by randomly selecting
an already existing object of the related model. But, what if you don't have
one yet?  You can provide the ``generate_fk`` attribute which allows the
autofixture instance to follow foreignkeys by generating new related models::

    fixture = AutoFixture(Entry, generate_fk=True)

This generates new instances for *all* foreignkey fields of ``Entry``. Unless
the model has a foreign key reference to itself, wherein the field will be set
to None if allowed or raise a ``CreateInstanceError``. This is to prevent max
recursion depth errors. It's possible to limit this behaviour to single
fields::

    fixture = AutoFixture(Entry, generate_fk=['author'])

This will only create new authors automatically and doesn't touch other
tables. The same is possible with many to many fields. But you need to
additionally specify how many objects should be created for the m2m relation::

    fixture = AutoFixture(Entry, generate_m2m={'categories': (1,3)})

All created entry models get one to three new categories assigned.

Setting custom values for fields
--------------------------------

As shown the the examples above, it's often necessary to have a specific field
contain a specific value. This is easily achieved with the ``field_values``
attribute of ``AutoFixture``::

    fixture = AutoFixture(Entry,
        field_values={'pub_date': datetime(2010, 2, 1)})


Limiting the set of models assigned to a ForeignKey field
----------------------------------------------------------

You could, for example, limit the Users assigned to a foreignkey field to only
non-staff Users. Or create Entries for all Blogs not belonging to Yoko Ono.
Use the same construction as ForeignKey.limit_choices_to_ attribute::

    from autofixture import AutoFixture, generators
    fixture = AutoFixture(Entry, field_values={
        'blog': generators.InstanceSelector(
            Blog,
            limit_choices_to={'name__ne':"Yoko Ono's blog"})
    })


Custom autofixtures
===================

To have custom autofixtures for your model, you can easily subclass
``AutoFixture`` somewhere (e.g. in myapp/autofixtures.py) ::

    from models import MyModel
    from autofixture import generators, register, AutoFixture

    class MyModelAutoFixture(AutoFixture):
        field_values = {
            'name': generators.StaticGenerator('this_is_my_static_name'),
        }

    register(MyModel, MyModelAutoFixture)


Then, ``loadtestdata`` will automatically use your custom fixtures. ::

    python manage.py loadtestdata app.MyModel:10

You can load all ``autofixtures.py`` files of your installed apps
automatically like you can do with the admin autodiscover. Do so by running
``autofixture.autodiscover()`` somewhere in the code, preferably in the
``urls.py``.


More
====

There is so much more to explore which might be useful to you and your
projects:

* There are ways to register custom ``AutoFixture`` subclasses with models
  that are automatically used when calling ``loadtestdata`` on the model.
* More control for related models, even with relations of related models...
  (e.g. by using ``generate_fk=['author', 'author__user']``)
* Custom constraints that are used to ensure that created models are
  valid (e.g. ``unique`` and ``unique_together`` constraints, which are
  already handled by default)


Contribute
==========

You can find the latest development version on github_. Get there and fork it,
file bugs or send me nice wishes.

To start developing, make sure the test suite passes::

    virtualenv .env
    source .env/bin/activate
    pip install -r requirements/tests.txt
    python setup.py test

Now go, do some coding.

Feel free to drop me a message about critiques or feature requests. You can get
in touch with me by mail_ or twitter_.

Happy autofixturing!

.. _github: https://github.com/gregmuellegger/django-autofixture
.. _mail: mailto:gregor@muellegger.de
.. _twitter: http://twitter.com/gregmuellegger
.. _ForeignKey.limit_choices_to: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.limit_choices_to

.. |build| image:: https://travis-ci.org/gregmuellegger/django-autofixture.svg?branch=master
    :alt: Build Status
    :scale: 100%
    :target: https://travis-ci.org/gregmuellegger/django-autofixture

.. |package| image:: https://badge.fury.io/py/django-autofixture.svg
    :alt: Package Version
    :scale: 100%
    :target: http://badge.fury.io/py/django-autofixture


Changelog
=========

0.12.1
------

* `#85`_: Better examples in README. Thanks to Dan Hitt for the patch.
* `#86`_: Less deprecation warnings when using django-autofixture on Python
  3.5. Thanks to Nick Timkovich for the patch.
* `#87`_: Closing files properly, so you should see less ``ResourceWarnings``
  while using django-autofixture. Thanks to Nick Timkovich for the patch.

.. _#85: https://github.com/gregmuellegger/django-autofixture/pull/85
.. _#86: https://github.com/gregmuellegger/django-autofixture/pull/86
.. _#87: https://github.com/gregmuellegger/django-autofixture/pull/87

0.12.0
------

* `#81`_: Add support for UUID fields. Thanks to @jungornti for the patch.
* `#77`_: Fixing a very rare crash in cases when a generated email in the
  ``UserFixture`` already exists. Thanks to Tien Nguyen for the patch.

.. _#77: https://github.com/gregmuellegger/django-autofixture/pull/77
.. _#81: https://github.com/gregmuellegger/django-autofixture/pull/81

0.11.0
------

* `#75`_: Support for Django 1.9. Thanks to Adam Dobrawy for the patch.
* `#67`_: If many to many relations are created in a autofixture, we now make sure
  that a registered autofixture is used for this if there is any. Thanks to
  Andrew Lewisohn for the patch.

.. _#75: https://github.com/gregmuellegger/django-autofixture/pull/75
.. _#67: https://github.com/gregmuellegger/django-autofixture/pull/67

0.10.1
------

* Fixing unique constraint checks for multiple ``None`` values. Thanks to
  Andrew Lewisohn for the patch. See `#66`_.

.. _#66: https://github.com/gregmuellegger/django-autofixture/pull/66

0.10.0
------

* Supporting Django 1.7 style app configs in ``settings.INSTALLED_APPS``
  when auto-importing autofixture definitions with
  ``autofixture.autodiscover``.
* Adding ``autofixture.generators.PositiveDecimalGenerator``.

0.9.2
-----

* Fixed ``UserFixture`` that generated usernames with more than 30 characters.

0.9.1
-----

* Fixed unique constraint for models that have multiple unique_togethers set.

0.9
---
* Make ``ImageGenerator`` consider the given file storage. Thanks to Andrew
  Pashkin for the patch.
* Fixing check for unique constraint during data generation if the field
  allows to be nullable. Thanks for Andrew Pashkin for the report and fix.

0.8.0
-----

* Adding support for django's ``ImageField``. Thanks to Visgean Skeloru for
  the patch.

0.7.0
-----

* Adding ``AutoFixture.pre_process_instance`` method.
* Allow arbitrary keyword arguments for ``AutoFixture.create`` method.
* Fixing ``autofixture.unregister`` function.
* Fixing ``UserFixture.post_process_instance``.

0.6.3
-----

* Fixing long stated issue with GenericRelation fields. Thanks to StillNewb
  for the patch.

0.6.2
-----

* Supporting Django 1.6.

0.6.1
-----

* Fixing issue with models that have a selfreferencing ForeignKey field.
  Thanks to Josh Fyne for the patch.

0.6.0
-----

* Adding ``generators.WeightedGenerator`` for propabilistic selection of
  values. Thanks to Jonathan Tien for the idea and patch.
* Supporting model inheritance. Thanks to Josh Fyne for the patch.

0.5.0
-----

* Adding ``FirstNameGenerator`` and ``LastNameGenerator``. Thanks to Jonathan
  Tien for the initial patch.
* Registered Autofixtures are used for models that are created for foreignkeys
  and many to many relations. Thanks to Theo Spears for the report.

0.4.0
-----

* Python 3 support! Though we had to drop Python 2.5 support. If you cannot
  upgrade to Python 2.6 by yet, please consider using the 0.3.x versions of
  django-autofixture.
  By the way: by Python 3 support, I mean, that the test suite is running
  without any errors. I have not tested yet the library in production for
  Python 3. So please test and submit bug reports if you encounter any.

0.3.2
-----

* ``DateTimeField`` receive timezone aware datetime objects now. Thanks to
  Scott Woodall for the report and patch.
* Adding ``static_domain`` parameter to ``EmailGenerator`` to allow the
  production of emails that will always have the same domain. Thanks to
  mvdwaeter for the initial patch.

0.3.1
-----

* ``field_values`` were not picked up if there was a default value assigned to
  the field. Thanks to sirex for the report.

0.3.0
-----

* Adding better support for subclassing ``AutoFixture`` through merging of
  nested ``Values`` classes.
* Renamed attribute and argument ``none_chance`` to better matching name ``empty_p`` for generators
  and ``none_p`` for ``AutoFixture``.
* Fixed some issues with management command options. Thanks Mikko Hellsing for
  his hard work.
* Fixed issues in unregister(). Thanks Mikko Hellsing for the report.
* Adding support for ``FloatField``. Thanks to Jyr Gaxiola for the report.

0.2.5
-----

* Fixing issue with ``--generate-fk`` option in management command. Thanks
  Mikko Hellsing for the `report and fix`_.

.. _report and fix: http://github.com/gregmuellegger/django-autofixture/issues/issue/1/

0.2.4
-----

* Using ``Autofixture.Values`` for defining initial values in ``Autofixture``
  subclasses.

* Making autodiscover more robust. Don't break if some module can't be
  imported or throws any other exception.

0.2.3
-----

* Fixing bug when a ``CharField`` with ``max_length`` smaller than 15 is used.

* ``AutoFixture.field_values`` accepts callables as values.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/squadrun/django-autofixture",
    "name": "django-autofixture-squad",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Gregor M\u00fcllegger",
    "author_email": "gregor@muellegger.de",
    "download_url": "https://files.pythonhosted.org/packages/ea/9e/7c3ce36ac249128f3df95fdba7db7ca012abc265d6002f9b16b6ade9deec/django-autofixture-squad-0.12.6.tar.gz",
    "platform": null,
    "description": "==================\ndjango-autofixture\n==================\n\n|build| |package|\n\nThis app aims to provide a simple way of loading masses of randomly generated\ntest data into your development database. You can use a management command to\nload test data through command line.\n\nIt is named *autofixture* because it is based on  django's fixtures. Without\n*autofixture* you add test data through the admin to see how the non-static\npages on your site look. You export data by using ``dumpdata`` to\nsend it to your colleagues or to preserve it before you make a ``manage.py\nreset app`` and so on. As your site grows in complexity the process of adding\nand re-adding data becomes more and more annoying.\n\nThis is where autofixtures will help!\n\n\nRequirements\n============\n\n* We require and support Django 1.4 to 1.9\n\n\nInstallation\n============\n\nYou must make the ``autofixture`` package available on your python path.\nEither drop it into your project directory or install it from the python\npackage index with ``pip install django-autofixture``. You can also use\n``easy_install django-autofixture`` if you don't have pip available.\n\nTo use the management command you must add ``'autofixture'`` to the\n``INSTALLED_APPS`` setting in your django settings file. You don't need to do\nthis if you want to use the ``autofixture`` package only as library.\n\n\nManagement command\n==================\n\nThe ``loadtestdata`` accepts the following syntax::\n\n    python manage.py loadtestdata [options] app.Model:# [app.Model:# ...]\n\nIt's nearly self explanatory. Supply names of models, prefixed with its app\nname. After that, place a colon and tell the command how many objects you want\nto create. Here is an example of how to create three categories and twenty\nentries for your blogging app::\n\n    python manage.py loadtestdata blog.Category:3 blog.Entry:20\n\nVoila! You have ready-to-use testing data populated to your database. The\nmodel fields are filled with data by producing randomly generated values\ndepending on the type of the field. E.g. text fields are filled with lorem\nipsum dummies, date fields are populated with random dates from the last\nyear etc.\n\nThere are a few command line options available. Mainly to control the\nbehavior of related fields. If foreingkey or many to many fields should be\npopulated with existing data or if the related models are also generated on\nthe fly. Please have a look at the help page of the command for more\ninformation::\n\n    python manage.py help loadtestdata\n\n\nUsing autofixtures as a tool for unittests\n==========================================\n\nTesting the behavior of complex models has always bugged me. Sometimes models\nhave many restrictions or many related objects which they depend on. One\nsolution would be to use traditional fixtures dumped from your production\ndatabase. But while in development when database schemes are changing\nfrequently, it can be time consuming and sometimes difficult to deep track of\nchanges and what each dump contains.\n\nAutofixtures to the rescue!\n\nLet's start with the basics. We create an ``AutoFixture`` instance for the\n``Entry`` model and tell it to create ten model instances::\n\n    >>> from autofixture import AutoFixture\n    >>> fixture = AutoFixture(Entry)\n    >>> entries = fixture.create(10)\n\nHere are further examples for newer developers.\n\nI have a ``Listing`` model and I want it populated with 10 objects.\n\n::\n\n    >>> from autofixture import AutoFixture\n    >>> fixture = AutoFixture(Listing)\n    >>> entries = fixture.create(10)\n\nHere I've added field values which allow you to default a field to a certain\nvalue rather than the random entries supplied by *autofixture*.\n\nGeneric Example including field_values:\n\n::\n\n    from <yourapp>.models import <your model>\n    fixture = AutoFixture(<your model>, field_values={'<your field name>':<value>})\n\nSpecific example::\n\n    from main.models import Listing\n    fixture = AutoFixture(Listing, field_values={'needed_players': randint(2,10)})\n    entries=fixture.create(30)\n\nIn the above, I wanted the ``'needed_players'`` (in the Session model) to have\nonly numbers between 2 and 10, but I could have put ``{'needed_players': 5}``\nif I had wanted all ``'needed_players'`` instances to be ``5``.\n\n========================================\n\nNow you can play around and test your blog entries. By default, dependencies\nof foreignkeys and many to many relations are populated by randomly selecting\nan already existing object of the related model. But, what if you don't have\none yet?  You can provide the ``generate_fk`` attribute which allows the\nautofixture instance to follow foreignkeys by generating new related models::\n\n    fixture = AutoFixture(Entry, generate_fk=True)\n\nThis generates new instances for *all* foreignkey fields of ``Entry``. Unless\nthe model has a foreign key reference to itself, wherein the field will be set\nto None if allowed or raise a ``CreateInstanceError``. This is to prevent max\nrecursion depth errors. It's possible to limit this behaviour to single\nfields::\n\n    fixture = AutoFixture(Entry, generate_fk=['author'])\n\nThis will only create new authors automatically and doesn't touch other\ntables. The same is possible with many to many fields. But you need to\nadditionally specify how many objects should be created for the m2m relation::\n\n    fixture = AutoFixture(Entry, generate_m2m={'categories': (1,3)})\n\nAll created entry models get one to three new categories assigned.\n\nSetting custom values for fields\n--------------------------------\n\nAs shown the the examples above, it's often necessary to have a specific field\ncontain a specific value. This is easily achieved with the ``field_values``\nattribute of ``AutoFixture``::\n\n    fixture = AutoFixture(Entry,\n        field_values={'pub_date': datetime(2010, 2, 1)})\n\n\nLimiting the set of models assigned to a ForeignKey field\n----------------------------------------------------------\n\nYou could, for example, limit the Users assigned to a foreignkey field to only\nnon-staff Users. Or create Entries for all Blogs not belonging to Yoko Ono.\nUse the same construction as ForeignKey.limit_choices_to_ attribute::\n\n    from autofixture import AutoFixture, generators\n    fixture = AutoFixture(Entry, field_values={\n        'blog': generators.InstanceSelector(\n            Blog,\n            limit_choices_to={'name__ne':\"Yoko Ono's blog\"})\n    })\n\n\nCustom autofixtures\n===================\n\nTo have custom autofixtures for your model, you can easily subclass\n``AutoFixture`` somewhere (e.g. in myapp/autofixtures.py) ::\n\n    from models import MyModel\n    from autofixture import generators, register, AutoFixture\n\n    class MyModelAutoFixture(AutoFixture):\n        field_values = {\n            'name': generators.StaticGenerator('this_is_my_static_name'),\n        }\n\n    register(MyModel, MyModelAutoFixture)\n\n\nThen, ``loadtestdata`` will automatically use your custom fixtures. ::\n\n    python manage.py loadtestdata app.MyModel:10\n\nYou can load all ``autofixtures.py`` files of your installed apps\nautomatically like you can do with the admin autodiscover. Do so by running\n``autofixture.autodiscover()`` somewhere in the code, preferably in the\n``urls.py``.\n\n\nMore\n====\n\nThere is so much more to explore which might be useful to you and your\nprojects:\n\n* There are ways to register custom ``AutoFixture`` subclasses with models\n  that are automatically used when calling ``loadtestdata`` on the model.\n* More control for related models, even with relations of related models...\n  (e.g. by using ``generate_fk=['author', 'author__user']``)\n* Custom constraints that are used to ensure that created models are\n  valid (e.g. ``unique`` and ``unique_together`` constraints, which are\n  already handled by default)\n\n\nContribute\n==========\n\nYou can find the latest development version on github_. Get there and fork it,\nfile bugs or send me nice wishes.\n\nTo start developing, make sure the test suite passes::\n\n    virtualenv .env\n    source .env/bin/activate\n    pip install -r requirements/tests.txt\n    python setup.py test\n\nNow go, do some coding.\n\nFeel free to drop me a message about critiques or feature requests. You can get\nin touch with me by mail_ or twitter_.\n\nHappy autofixturing!\n\n.. _github: https://github.com/gregmuellegger/django-autofixture\n.. _mail: mailto:gregor@muellegger.de\n.. _twitter: http://twitter.com/gregmuellegger\n.. _ForeignKey.limit_choices_to: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.limit_choices_to\n\n.. |build| image:: https://travis-ci.org/gregmuellegger/django-autofixture.svg?branch=master\n    :alt: Build Status\n    :scale: 100%\n    :target: https://travis-ci.org/gregmuellegger/django-autofixture\n\n.. |package| image:: https://badge.fury.io/py/django-autofixture.svg\n    :alt: Package Version\n    :scale: 100%\n    :target: http://badge.fury.io/py/django-autofixture\n\n\nChangelog\n=========\n\n0.12.1\n------\n\n* `#85`_: Better examples in README. Thanks to Dan Hitt for the patch.\n* `#86`_: Less deprecation warnings when using django-autofixture on Python\n  3.5. Thanks to Nick Timkovich for the patch.\n* `#87`_: Closing files properly, so you should see less ``ResourceWarnings``\n  while using django-autofixture. Thanks to Nick Timkovich for the patch.\n\n.. _#85: https://github.com/gregmuellegger/django-autofixture/pull/85\n.. _#86: https://github.com/gregmuellegger/django-autofixture/pull/86\n.. _#87: https://github.com/gregmuellegger/django-autofixture/pull/87\n\n0.12.0\n------\n\n* `#81`_: Add support for UUID fields. Thanks to @jungornti for the patch.\n* `#77`_: Fixing a very rare crash in cases when a generated email in the\n  ``UserFixture`` already exists. Thanks to Tien Nguyen for the patch.\n\n.. _#77: https://github.com/gregmuellegger/django-autofixture/pull/77\n.. _#81: https://github.com/gregmuellegger/django-autofixture/pull/81\n\n0.11.0\n------\n\n* `#75`_: Support for Django 1.9. Thanks to Adam Dobrawy for the patch.\n* `#67`_: If many to many relations are created in a autofixture, we now make sure\n  that a registered autofixture is used for this if there is any. Thanks to\n  Andrew Lewisohn for the patch.\n\n.. _#75: https://github.com/gregmuellegger/django-autofixture/pull/75\n.. _#67: https://github.com/gregmuellegger/django-autofixture/pull/67\n\n0.10.1\n------\n\n* Fixing unique constraint checks for multiple ``None`` values. Thanks to\n  Andrew Lewisohn for the patch. See `#66`_.\n\n.. _#66: https://github.com/gregmuellegger/django-autofixture/pull/66\n\n0.10.0\n------\n\n* Supporting Django 1.7 style app configs in ``settings.INSTALLED_APPS``\n  when auto-importing autofixture definitions with\n  ``autofixture.autodiscover``.\n* Adding ``autofixture.generators.PositiveDecimalGenerator``.\n\n0.9.2\n-----\n\n* Fixed ``UserFixture`` that generated usernames with more than 30 characters.\n\n0.9.1\n-----\n\n* Fixed unique constraint for models that have multiple unique_togethers set.\n\n0.9\n---\n* Make ``ImageGenerator`` consider the given file storage. Thanks to Andrew\n  Pashkin for the patch.\n* Fixing check for unique constraint during data generation if the field\n  allows to be nullable. Thanks for Andrew Pashkin for the report and fix.\n\n0.8.0\n-----\n\n* Adding support for django's ``ImageField``. Thanks to Visgean Skeloru for\n  the patch.\n\n0.7.0\n-----\n\n* Adding ``AutoFixture.pre_process_instance`` method.\n* Allow arbitrary keyword arguments for ``AutoFixture.create`` method.\n* Fixing ``autofixture.unregister`` function.\n* Fixing ``UserFixture.post_process_instance``.\n\n0.6.3\n-----\n\n* Fixing long stated issue with GenericRelation fields. Thanks to StillNewb\n  for the patch.\n\n0.6.2\n-----\n\n* Supporting Django 1.6.\n\n0.6.1\n-----\n\n* Fixing issue with models that have a selfreferencing ForeignKey field.\n  Thanks to Josh Fyne for the patch.\n\n0.6.0\n-----\n\n* Adding ``generators.WeightedGenerator`` for propabilistic selection of\n  values. Thanks to Jonathan Tien for the idea and patch.\n* Supporting model inheritance. Thanks to Josh Fyne for the patch.\n\n0.5.0\n-----\n\n* Adding ``FirstNameGenerator`` and ``LastNameGenerator``. Thanks to Jonathan\n  Tien for the initial patch.\n* Registered Autofixtures are used for models that are created for foreignkeys\n  and many to many relations. Thanks to Theo Spears for the report.\n\n0.4.0\n-----\n\n* Python 3 support! Though we had to drop Python 2.5 support. If you cannot\n  upgrade to Python 2.6 by yet, please consider using the 0.3.x versions of\n  django-autofixture.\n  By the way: by Python 3 support, I mean, that the test suite is running\n  without any errors. I have not tested yet the library in production for\n  Python 3. So please test and submit bug reports if you encounter any.\n\n0.3.2\n-----\n\n* ``DateTimeField`` receive timezone aware datetime objects now. Thanks to\n  Scott Woodall for the report and patch.\n* Adding ``static_domain`` parameter to ``EmailGenerator`` to allow the\n  production of emails that will always have the same domain. Thanks to\n  mvdwaeter for the initial patch.\n\n0.3.1\n-----\n\n* ``field_values`` were not picked up if there was a default value assigned to\n  the field. Thanks to sirex for the report.\n\n0.3.0\n-----\n\n* Adding better support for subclassing ``AutoFixture`` through merging of\n  nested ``Values`` classes.\n* Renamed attribute and argument ``none_chance`` to better matching name ``empty_p`` for generators\n  and ``none_p`` for ``AutoFixture``.\n* Fixed some issues with management command options. Thanks Mikko Hellsing for\n  his hard work.\n* Fixed issues in unregister(). Thanks Mikko Hellsing for the report.\n* Adding support for ``FloatField``. Thanks to Jyr Gaxiola for the report.\n\n0.2.5\n-----\n\n* Fixing issue with ``--generate-fk`` option in management command. Thanks\n  Mikko Hellsing for the `report and fix`_.\n\n.. _report and fix: http://github.com/gregmuellegger/django-autofixture/issues/issue/1/\n\n0.2.4\n-----\n\n* Using ``Autofixture.Values`` for defining initial values in ``Autofixture``\n  subclasses.\n\n* Making autodiscover more robust. Don't break if some module can't be\n  imported or throws any other exception.\n\n0.2.3\n-----\n\n* Fixing bug when a ``CharField`` with ``max_length`` smaller than 15 is used.\n\n* ``AutoFixture.field_values`` accepts callables as values.\n\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Provides tools to auto generate test data.",
    "version": "0.12.6",
    "project_urls": {
        "Homepage": "https://github.com/squadrun/django-autofixture"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3de19cdaea1b46518072d3575a2e5cbe0f1d358242a145b66823534d4116844a",
                "md5": "99a9e8b59dae83bd879376edf82755cb",
                "sha256": "5b4f8059ef0bc6df438d55ef325be8fa7b54087f1120dd30fa410dbd118d2f77"
            },
            "downloads": -1,
            "filename": "django_autofixture_squad-0.12.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "99a9e8b59dae83bd879376edf82755cb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 30266,
            "upload_time": "2023-08-04T10:28:41",
            "upload_time_iso_8601": "2023-08-04T10:28:41.263020Z",
            "url": "https://files.pythonhosted.org/packages/3d/e1/9cdaea1b46518072d3575a2e5cbe0f1d358242a145b66823534d4116844a/django_autofixture_squad-0.12.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea9e7c3ce36ac249128f3df95fdba7db7ca012abc265d6002f9b16b6ade9deec",
                "md5": "ea82f710c2b73af183a879cca47fe8d7",
                "sha256": "0f373f12c32de449bd3ca083e6b98ab36da7503415ce3f7d248f1b84ca3863d6"
            },
            "downloads": -1,
            "filename": "django-autofixture-squad-0.12.6.tar.gz",
            "has_sig": false,
            "md5_digest": "ea82f710c2b73af183a879cca47fe8d7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 32377,
            "upload_time": "2023-08-04T10:28:44",
            "upload_time_iso_8601": "2023-08-04T10:28:44.585845Z",
            "url": "https://files.pythonhosted.org/packages/ea/9e/7c3ce36ac249128f3df95fdba7db7ca012abc265d6002f9b16b6ade9deec/django-autofixture-squad-0.12.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-04 10:28:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "squadrun",
    "github_project": "django-autofixture",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "django-autofixture-squad"
}
        
Elapsed time: 1.40595s