aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauly Fenwar <fenney@gmail.com>2015-05-06 13:54:31 +0100
committerRaphaƫl Barrois <raphael.barrois@polytechnique.org>2015-05-20 23:35:01 +0200
commitda8d2e6323014be6065a9a490754173859fb95b4 (patch)
tree934e11053d2101a44447a5b611b023cbc70116ef
parent939796a915d66722b0c3a286a12c88757d4eb137 (diff)
downloadfactory-boy-da8d2e6323014be6065a9a490754173859fb95b4.tar
factory-boy-da8d2e6323014be6065a9a490754173859fb95b4.tar.gz
Update README.rst - "attributes" is not a strategy (Closes #204).
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.
-rw-r--r--README.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/README.rst b/README.rst
index 59ea0cf..991180f 100644
--- a/README.rst
+++ b/README.rst
@@ -64,7 +64,7 @@ Its main features include:
- Straightforward declarative syntax
- Chaining factory calls while retaining the global context
-- Support for multiple build strategies (saved/unsaved instances, attribute dicts, stubbed objects)
+- Support for multiple build strategies (saved/unsaved instances, stubbed objects)
- Multiple factories per class support, including inheritance
@@ -135,7 +135,7 @@ The class of the object must be defined in the ``model`` field of a ``class Meta
Using factories
"""""""""""""""
-factory_boy supports several different build strategies: build, create, attributes and stub:
+factory_boy supports several different build strategies: build, create, and stub:
.. code-block:: python
@@ -145,8 +145,8 @@ factory_boy supports several different build strategies: build, create, attribut
# Returns a saved User instance
user = UserFactory.create()
- # Returns a dict of attributes that can be used to build a User instance
- attributes = UserFactory.attributes()
+ # Returns a stub object (just a bunch of attributes)
+ obj = UserFactory.stub()
You can use the Factory class as a shortcut for the default build strategy: