aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Update testing targets (Closes #265)Raphaël Barrois2016-02-10
| | | | Thanks to @jeffwidman for suggesting this!
* Fix "no FloatOperation test", invalid until PY3Raphaël Barrois2016-02-10
|
* Clarify precedence on factory.django.FileField (Closes #257).Raphaël Barrois2016-02-10
| | | | | | | When both ``from_file`` and ``filename`` are provided, ``filename`` takes precedence. Thanks to @darkowic for spotting this :)
* fuzzy: Fix decimal.FloatOperation warning (Closes #261)Raphaël Barrois2016-02-10
| | | | | | | | | | | | Under Python 2.7+, the previous versions was directly casting fuzzy Decimal values into a float, which led to warnings in code trying to avoid such conversions in its tested code. Since we're just building random values, that behavior led to false positives or required jumping through weird hoops whenever a FuzzyDecimal was used. We now go trough a ``str()`` call to avoid such warnings.
* doc: Use ReadTheDocs theme for local doc builds.Raphaël Barrois2016-02-09
|
* Clarify the use of SelfAttribute in RelatedFactory (Closes #264)Raphaël Barrois2016-02-09
|
* optional forced flush on SQLAlchemyModelFactoryAlejandro2016-01-07
| | | | fixes rbarrois/factory_boy#81
* Clarify the (dis)advantages of randomized tests.Raphaël Barrois2016-01-07
| | | | | | As noted in #259, fully random tests have some issues, notably possibly flaky builds: it is quite helpful to be able to choose the random seeds used by factory_boy and friends.
* Fix obsolete text in docs (Closes #245, #248, #249).Raphaël Barrois2015-11-07
| | | | Thanks a lot to Jeff Widman for spotting them!
* mogo: Stop using .new, continued.Raphaël Barrois2015-10-21
| | | | | | From dc7d02095fff, spotted by @federicobond too. See #219.
* docs: Note 2.6.0 release date.Raphaël Barrois2015-10-21
|
* Release v2.6.0v2.6.0Raphaël Barrois2015-10-20
|
* Ideas: I want to be able to nest declarationsRaphaël Barrois2015-10-20
| | | | Closes #140, as this won't be implemented in the next few weeks.
* Tox isn't used, remove its config file.Raphaël Barrois2015-10-20
|
* Update note on django's unsaved instance checksRaphaël Barrois2015-10-20
| | | | | | | This note was added to document a regression in Django 1.8.0; the regression has been fixed in 1.8.4. Closes #232
* mogo: Stop using deprecated .new (Closes #219)Raphaël Barrois2015-10-20
| | | | | | This method has been deprecated in `mogo.model.Model` since 2012. Thanks to @federicobond for spotting this!
* Docs: Fix typo in M2M recipes (Closes #226)Raphaël Barrois2015-10-20
| | | | As spotted by @stephane, thanks!
* Lazy load django's get_model (Closes #228).Raphaël Barrois2015-10-20
| | | | | | Loading this function will, on pre-1.8 versions, load Django settings. We'll lazy-load it to avoid crashes when Django hasn't been configured yet (e.g in auto-discovery test setups).
* Docs: Document Faker.add_provider (Closes #218)Raphaël Barrois2015-10-20
|
* add a way to add custom providers to FakerIonuț Arțăriși2015-10-20
| | | | | | | | | | | factory_boy wraps faker and it stores Faker generators in a 'private' _FAKER_REGISTRY class attribute dict. There needs to be a way to extend the Faker generators with additional custom providers (without having to access _FAKER_REGISTRY directly). This commit adds a (factory_boy) Faker.add_provider class method which calls Faker's own `add_provider` method on internally stored (via _FAKER_REGISTRY) Faker generators.
* examples: Fix make test (Closes #238)Raphaël Barrois2015-10-20
| | | | Properly install dependencies from examples folders.
* 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!