summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Docs: 'import factory.fuzzy' as required (See #138).Raphaël Barrois2015-07-25
|
* Add examples folder.Raphaël Barrois2015-07-15
| | | | | This should contain examples of "using factory_boy with third-party frameworks".
* Improve debug logging efficiency (Closes #155).Raphaël Barrois2015-07-11
| | | | | As suggested by @adamchainz, use lazy computation of args/kwargs pprint to only perform complex computation when running with debug.
* Improve @coagulant's fixes to django signals (Closes #212).Raphaël Barrois2015-07-05
| | | | Signal caching didn't exist until Django 1.6.
* Fix mute_signals behavior for signals with cachingIlya Baryshev2015-07-05
| | | | | | | | | Connecting signals (with use_caching=True) inside mute_signals was breaking unmute on exit. Paused receivers were not running. This was caused by signal cache not being restored after unpatching. Workaround is to clear signal cache on exit. Fixes #212
* Remove requirement.txt, move content into requirements.txtPeter Marsh2015-06-30
| | | | | | | | | | | requirement.txt was introduced in 6f37f9b, after requirements.txt had already put in place. dev_requirements.txt installs the contents of requirements.txt (which is empty) while a single dependency is specified in requirement.txt. It looks like requirement.txt was added accidently and it's content should always have been in requirements.txt. This removes requirement.txt and puts the dependency delcared in there in requirements.txt.
* Improve ORM layer import paths (Closes #186).Raphaël Barrois2015-05-31
| | | | | | | | | You may now use the following code: import factory factory.alchemy.SQLAlchemyModelFactory factory.django.DjangoModelFactory factory.mongoengine.MongoEngineFactory
* Properly handle custom Django managers (Closes #201).Raphaël Barrois2015-05-31
| | | | | | The actual behavior of Django with custom managers and inherited abstract models is rather complex, so this had to be adapted to the actual Django source code.
* Docs: fix minor typo.Raphaël Barrois2015-05-31
| | | | As spotted by @proofit404
* Add lazy loading to factory.Iterator.Raphaël Barrois2015-05-24
| | | | | | | | | | | factory.Iterator no longers begins iteration of its argument on declaration, since this behavior may trigger database query when that argument is, for instance, a Django queryset. The ``factory.Iterator``'s argument will only be called when the containing ``Factory`` is first evaluated; this means that factories using ``factory.Iterator(models.MyThingy.objects.all())`` will no longer call the database at import time.
* Add factory.Faker()Raphaël Barrois2015-05-22
| | | | | This relies on the ``fake-factory`` library, and provides realistic random values for most field types.
* Update README.rst - "attributes" is not a strategy (Closes #204).Pauly Fenwar2015-05-20
| | | | The wording of the readme suggested that "attributes" is a strategy just like "build" and "create", but this is not the case in the implementation (for example keyword arguments do not work, SubFactory fields don't behave as expected), so I have removed the mention of this and replaced the attributes example to mention the "stub" strategy.
* Fix typo in docs/fuzzy (Closes #207).Raphaël Barrois2015-05-20
| | | | Thanks to @nikolas for spotting it!
* Add Meta.rename to handle name conflicts (See #206).Raphaël Barrois2015-05-20
| | | | | | Define ``Meta.rename = {'attrs': 'attributes'}`` if your model expects a ``attributes`` kwarg but you can't define it since it's already reserved by the ``Factory`` class.
* Fix typo.Raphaël Barrois2015-04-27
|
* Allow skipping Mongo tests.Raphaël Barrois2015-04-27
|
* Simpler way to define version names.Raphaël Barrois2015-04-27
| | | | Avoid hitting bugs with max shebang line length in jenkins.
* Update testing instructions.Raphaël Barrois2015-04-27
|
* Fix test startup for Django==1.6Raphaël Barrois2015-04-27
|
* Simplify dependencies installation for multi-version.Raphaël Barrois2015-04-27
| | | | | | | | | You may now use: ``make DJANGO_VERSION=1.7 test``. Valid options: * ``DJANGO_VERSION`` * ``MONGOENGINE_VERSION`` * ``ALCHEMY_VERSION``
* Clarify .build() issue with Django>1.8 (Ref #198).Raphaël Barrois2015-04-25
| | | | | | | | | | | | | | | | | | | | | | | | From 1.8 onwards, this crashes: >>> a = MyModel() # Don't save >>> b = MyOtherModel(fkey_to_mymodel=a) In turn, it breaks: class MyModelFactory(factory.django.DjangoModelFactory): class Meta: model = MyModel class MyOtherModelFactory(factory.django.DjangoModelFactory): class Meta: model = MyOtherModel fkey_to_mymodel = factory.SubFactory(MyModelFactory) MyOtherModelFactory.build() # Breaks The error message is: Cannot assign "MyModel()": "MyModel" instance isn't saved in the database. See https://code.djangoproject.com/ticket/10811 for details.
* README: Remove duplicate "latest release" block.Raphaël Barrois2015-04-21
|
* Release v2.5.2v2.5.2Raphaël Barrois2015-04-21
|
* Fix typo in setup.py (Closes #197).Raphaël Barrois2015-04-21
| | | | Thanks to @nikolas for spotting it!
* Declare Python3.4 supportRaphaël Barrois2015-04-21
|
* Add badges to README.Raphaël Barrois2015-04-21
|
* Add wheel supportRaphaël Barrois2015-04-21
|
* Update travis config: focus on Py2.7/Py3.4Raphaël Barrois2015-04-19
|
* Fix minor typo (Closes #194).Raphaël Barrois2015-04-14
| | | | Thanks to @DasAllFolks for spotting it!
* Remove warnings with Django 1.7 (Closes #195).Raphaël Barrois2015-04-14
| | | | | | | Builds upon pull request by @shinuza: - Properly import ``get_model`` - Run ``django.setup()`` before importing any models.
* test_mongoengine: fix typoRaphaël Barrois2015-04-12
|
* mongoengine: allow tuning the server timeout.Raphaël Barrois2015-04-12
| | | | So that it doesn't fail on ci...
* Fix tests with latest pymongo/mongoengine.Raphaël Barrois2015-04-12
| | | | | | | mongoengine>=0.9.0 and pymongo>=2.1 require extra parameters: - The server connection timeout was set too high - We have to define a ``read_preference``.
* Fix imports for Django 1.8Raphaël Barrois2015-04-02
|
* Fix custom queryset tests for Django<1.7Raphaël Barrois2015-03-27
|
* Release v2.5.1v2.5.1Raphaël Barrois2015-03-27
|
* Support declarations in FileField/ImageField.Raphaël Barrois2015-03-27
| | | | Previously, the declarations (``factory.Sequence`` & co) weren't properly computed.
* Respect default manager in DjangoModelFactory (Closes #192).Raphaël Barrois2015-03-27
| | | | | The previous version tries to use ``cls._default_manager`` all the time, which breaks with ``manager.using(db_name)``.
* Remove debug printsRaphaël Barrois2015-03-27
|
* Add upgrade instructions for 2.5.0Raphaël Barrois2015-03-27
|
* Clarify impacts of 2.5.0.Raphaël Barrois2015-03-26
|
* Update header years.Raphaël Barrois2015-03-26
|
* Get ready for next release.Raphaël Barrois2015-03-26
|
* Release v2.5.0v2.5.0Raphaël Barrois2015-03-26
|
* Turn FileField/ImageField into normal fields (Closes #141).Raphaël Barrois2015-03-26
| | | | | Previously, they ran as post_generation hooks, meaning that they couldn't be checked in a model's ``save()`` method, for instance.
* Remove limitations of factory.StubFactory (Closes #131).Raphaël Barrois2015-03-26
| | | | | ``StubFactory.build()`` is now supported, and maps to ``StubFactory.stub()``.
* Add support for multidb with Django (Closes #171).Raphaël Barrois2015-03-26
| | | | | | | | | | | | | | The ``factory.django.DjangoModelFactory`` now takes an extra option: ``` class MyFactory(factory.django.DjangoModelFactory): class Meta: model = models.MyModel database = 'replica' ``` This will create all instances of ``models.Model`` in the ``'replica'`` database.
* Fix issues between mute_signals() and factory inheritance (Closes #183).Raphaël Barrois2015-03-26
| | | | | | Previously, if a factory was decorated with ``@mute_signals`` and one of its descendant called another one of its descendant, signals weren't unmuted properly.
* Allow lazy evaluation of FuzzyChoice's iterators (Closes #184).Raphaël Barrois2015-03-26
| | | | | | | | | This allows the following idiom: ``user = factory.fuzzy.FuzzyChoice(User.objects.all())`` Previously, the ``User.objects.all()`` queryset would have been evaluated *at import time*; it is now evaluated with the first use of the ``FuzzyChoice``.
* Fix typo in FuzzyDateTime (Closes #189).Raphaël Barrois2015-03-26
| | | | Thanks to @shinuza for spotting this!