Skip to content

Commit

Permalink
Update README.rst - "attributes" is not a strategy (Closes #204).
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fenwar authored and rbarrois committed May 20, 2015
1 parent 939796a commit da8d2e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit da8d2e6

Please sign in to comment.