| Commit message (Expand) | Author | Age |
* | Factor lazy Factory import code. | Raphaël Barrois | 2013-06-10 |
* | Add django-based tests for DjangoModelFactory. | Raphaël Barrois | 2013-06-10 |
* | Add Factory.reset_sequence. | Raphaël Barrois | 2013-06-10 |
* | Move DjangoModelFactory / MogoFactory to their own modules. | Raphaël Barrois | 2013-06-09 |
* | Add LazyStub.factory_parent (See #55). | Raphaël Barrois | 2013-05-03 |
* | declarations: Rename RelatedFactory.name (See #58).•••Use less conflict-prone factory_related_name.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-04-29 |
* | Add tests.alter_time and fix time altering on pypy. | Raphaël Barrois | 2013-04-21 |
* | Add FuzzyDateTime/FuzzyNaiveDateTime. | Raphaël Barrois | 2013-04-21 |
* | Add FuzzyDate•••Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Saul Shanabrook | 2013-04-21 |
* | Don't use objects.get_or_create() unless required. | Raphaël Barrois | 2013-04-16 |
* | Release v2.0.1v2.0.1 | Raphaël Barrois | 2013-04-16 |
* | Add more tests for DjangoModelFactoryTestCase. | Raphaël Barrois | 2013-04-16 |
* | Add Dict/List declarations (Closes #18). | Raphaël Barrois | 2013-04-15 |
* | Allow overriding the sequence counter. | Raphaël Barrois | 2013-04-15 |
* | Add factory.fuzzy (Closes #41). | Raphaël Barrois | 2013-04-11 |
* | Pylint. | Raphaël Barrois | 2013-04-03 |
* | Nit: cleanup name of test methods. | Raphaël Barrois | 2013-04-03 |
* | internal: merge OrderedDeclaration.evaluate() variants. | Raphaël Barrois | 2013-04-03 |
* | Add support for get_or_create in DjangoModelFactory. | Raphaël Barrois | 2013-04-02 |
* | Add Factory.FACTORY_HIDDEN_ARGS.•••Fields listed in this class attributes will be removed from the
kwargs dict passed to the associated class for building/creation.
| Raphaël Barrois | 2013-04-02 |
* | Default Sequence.type to int (Closes #50). | Raphaël Barrois | 2013-03-24 |
* | Add full Python 3 compatibility (Closes #10, #20, #49).•••Also:
- update travis.yml to build against 2.6-2.7 and 3.2-3.3
- Switch to relative imports
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| nkryptic | 2013-03-15 |
* | Fix exception hierarchy.•••Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-15 |
* | Merge BaseFactoryMetaClass into FactoryMetaClass.•••Also fix FACTORY_STRATEGY.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-15 |
* | Remove extract_prefix from post-generation hooks.•••Magic abuse is bad.
| Raphaël Barrois | 2013-03-11 |
* | Remove CircularSubFactory.•••Replace CircularSubFactory('module', 'symbol') with SubFactory('module.symbol').
| Raphaël Barrois | 2013-03-11 |
* | Remove InfiniteIterator and infinite_iterator.•••Use Iterator/iterator instead.
| Raphaël Barrois | 2013-03-11 |
* | Remove automagic associated class discovery. | Raphaël Barrois | 2013-03-11 |
* | Remove building_function/creation_function.•••Stop defaulting to Django's .objects.create().
| Raphaël Barrois | 2013-03-11 |
* | Stop calling Foo.objects.create() when it doesn't break (Closes #23).•••This will be properly fixed in v2.0.0; the current heuristic is:
- If the user defined a custom _create method, use it
- If he didn't, but the associated class has a objects attribute, use TheClass.objects.create(*args, **kwargs)
- Otherwise, simply call TheClass(*args, **kwargs).
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-05 |
* | Improve doc on post-generation hooks (Closes #36).•••This was the last missing bit from PR#36 by @gotgenes.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-05 |
* | Cleanup argument extraction in PostGenMethod (See #36).•••This provides a consistent behaviour for extracting arguments to
a PostGenerationMethodCall.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-05 |
* | Let mock source be chosen by Python major version.•••This should provide better Python 3 compatibility, since mock is in the
Python 3 standard library as unittest.mock.
Conflicts:
tests/test_declarations.py
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Chris Lasher | 2013-03-04 |
* | Use extracted argument in PostGenerationMethodCall.•••This changeset makes it possible possible to override the default method
arguments (or "method_args") passed in when instantiating
PostGenerationMethodCall. Now the user can override the default
arguments to the method called during post-generation when instantiating
a factory.
For example, using this UserFactory,
class UserFactory(factory.Factory):
FACTORY_FOR = User
username = factory.Sequence(lambda n: 'user{0}'.format(n))
password = factory.PostGenerationMethodCall(
'set_password', None, 'defaultpassword')
by default, the user will have a password set to 'defaultpassword', but
this can be overridden by passing in a new password as a keyword
argument:
>>> u = UserFactory()
>>> u.check_password('defaultpassword')
True
>>> other_u = UserFactory(password='different')
>>> other_u.check_password('defaultpassword')
False
>>> other_u.check_password('different')
True
This changeset introduces a testing dependency on the Mock package
http://pypi.python.org/pypi/mock. While this is a third-party dependency
in Python 2, it is part of the Python 3 standard library, as unit.mock,
and so a reasonable dependency to satisfy.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Chris Lasher | 2013-03-04 |
* | Add a 'after post_generation' hook to Factory.•••Use it in DjangoModelFactory to save objects again if a post_generation hook ran.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-04 |
* | Allow symbol names in RelatedFactory (Closes #30).•••This works exactly as for SubFactory.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-03 |
* | Get rid of the FACTORY_ABSTRACT rename.•••This was just adding noise to an already complex release.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-03 |
* | Improve coverage.•••Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-03 |
* | Deprecate the extract_prefix option to PostGeneration.•••Introduces a new, call-less syntax for the @post_generation decorator.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-03 |
* | Tests: improve deprecation warning detection in test_base.•••Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-03 |
* | Tests: move disable_warnings to its own class.•••Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-03 |
* | Improve Iterator and SubFactory declarations.•••* Iterator now cycles by default
* Iterator can be provided with a custom getter
* SubFactory accepts a factory import path as well
Deprecates:
* InfiniteIterator
* CircularSubFactory
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-03-03 |
* | Add test for dual class/factory inheritance.•••If it works properly, this would make pylint happy.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-02-27 |
* | Happy New Year!•••Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2013-01-02 |
* | Keep FACTORY_FOR around.•••And add a test too.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2012-11-15 |
* | Rename ABSTRACT_FACTORY to FACTORY_ABSTRACT.•••And add a deprecation warning too.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2012-11-15 |
* | Add an extension point for kwargs mangling.•••Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2012-11-15 |
* | Mix SelfAttribute with ContainerAttribute.•••With a very simple syntax.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2012-11-15 |
* | [py3] Various python3-compatibility fixes.•••Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2012-11-15 |
* | [py3] Rename xrange to range•••Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
| Raphaël Barrois | 2012-11-15 |