summaryrefslogtreecommitdiff
path: root/factory/base.py
Commit message (Collapse)AuthorAge
* [py3] Rename xrange to rangeRaphaël Barrois2012-11-15
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* [py3] Remove calls to iteritems().Raphaël Barrois2012-11-15
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add support for passing non-kwarg parameters to factories.Raphaël Barrois2012-08-17
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add DeprecationWarnings on set_XXX_function.Raphaël Barrois2012-08-16
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Refactor building_function/creation_function handling.Raphaël Barrois2012-08-16
| | | | | | Rely on inheritance instead of handwritten set_creation_function and such. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Mark automatic associated class discovery as deprecated.Raphaël Barrois2012-08-16
| | | | | | Also improve warning reporting. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Handle the PostGeneration declarations.Raphaël Barrois2012-04-15
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Whitespace cleanupRaphaël Barrois2012-04-15
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Fix the __str__ method of factory classes.Raphaël Barrois2012-04-07
|
* Add and document abstract factories (Closes #8).Raphaël Barrois2012-04-07
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add a '@use_strategy' decorator for forcing alternate strategies.Raphaël Barrois2012-03-17
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add support for 'generate' and 'simple_generate'Raphaël Barrois2012-02-24
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add batches.Raphaël Barrois2012-02-24
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add a PendingDeprecationWarning on associated class auto-discovery.Raphaël Barrois2012-01-13
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add __repr__ / __str__ to a couple of objects.Raphaël Barrois2012-01-12
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Publish the make_factory method, and make sure that complex declarations ↵Raphaël Barrois2012-01-06
| | | | | | work with it. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add factory.build(), factory.create(), factory.stub() methods.Raphaël Barrois2012-01-06
| | | | | | Those are shortcuts for writing a full Factory class. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* More cleanup and comments in factory.baseRaphaël Barrois2011-12-21
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Cleanup base module.Raphaël Barrois2011-12-21
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add encoding header.Raphaël Barrois2011-12-21
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Update copyrights.Raphaël Barrois2011-12-21
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Allow custom 'build' functions.Raphaël Barrois2011-12-21
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Django models always have a _default_manager attribute; .objects may not be ↵Raphaël Barrois2011-12-12
| | | | a manager.
* Rewrite all the 'OrderedDeclaration' part.Raphaël Barrois2011-09-06
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Bugfix for stub.Raphaël Barrois2011-09-06
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Update all tests, and fix a couple of bugs.Raphaël Barrois2011-09-06
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Huge refactoring and code cleanup.Raphaël Barrois2011-09-06
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Update docstrings.Raphaël Barrois2011-09-05
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Allow inheriting from more than one factory.Raphaël Barrois2011-08-22
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Cleanup rmoch's DjangoModelFactory fix.Raphaël Barrois2011-08-18
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Bugfix DjangoModelFactoryRichard Moch2011-08-17
|
* Use the same sequence counter for parent and child classes.Raphaël Barrois2011-08-10
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Allow the definition of 'abstract' factories.Raphaël Barrois2011-08-03
| | | | | | Needs more testing. Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Add a 'DjangoModelFactory'.Raphaël Barrois2011-08-03
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Allow users to define a custom method for retrieving the first sequence of a ↵Raphaël Barrois2011-07-05
| | | | | | given factory. Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Fix the SubFactory/Sequence behaviour.Raphaël Barrois2011-05-24
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Prevent inherited classes from affecting superclasses.Raphaël Barrois2011-05-16
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Add SubFactories, and full testing.Raphaël Barrois2011-05-16
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Add a DeclarationHolder containing all the logic related to attribute ↵Raphaël Barrois2011-05-16
| | | | | | declaration. Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Cleaner code for ordered attributes.Raphaël Barrois2011-05-13
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Improve handling of custom build/create functions.Raphaël Barrois2011-05-13
| | | | | | Only public attributes (i.e not starting with _) will be handled properly. Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Improve base.py: use pop(), allow factory inheritance.Raphaël Barrois2011-05-12
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Remove trailing whitespaceRaphaël Barrois2011-05-11
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* factory_boy: a test fixtures replacement based on thoughtbot's factory_girl ↵Mark Sandstrom2010-08-22
for Ruby