aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJonathan Tushman <jtushman@pipewave.com>2013-09-07 16:30:25 -0400
committerRaphaƫl Barrois <raphael.barrois@polytechnique.org>2013-09-13 02:03:35 +0200
commit676e02fd916a4e41a6080d29ef8f89925c499f35 (patch)
tree86b458a92d7f4c5d755449c22d56459e1c71a46c /docs
parentca393990b35062c5151bc529622131dc93bbed84 (diff)
downloadfactory-boy-676e02fd916a4e41a6080d29ef8f89925c499f35.tar
factory-boy-676e02fd916a4e41a6080d29ef8f89925c499f35.tar.gz
Adding factory support for mongoengine (Closes #89).
Diffstat (limited to 'docs')
-rw-r--r--docs/changelog.rst1
-rw-r--r--docs/orms.rst23
2 files changed, 24 insertions, 0 deletions
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 75f1c41..0367246 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -15,6 +15,7 @@ ChangeLog
- The :class:`~factory.django.DjangoModelFactory` now supports the ``FACTORY_FOR = 'myapp.MyModel'``
syntax, making it easier to shove all factories in a single module (:issue:`66`).
+ - Adding factory support for mongoengine with :class:`~factory.mongoengine.MongoEngineFactory`.
.. _v2.1.2:
diff --git a/docs/orms.rst b/docs/orms.rst
index 8215fe6..74c5c62 100644
--- a/docs/orms.rst
+++ b/docs/orms.rst
@@ -163,6 +163,29 @@ factory_boy supports `Mogo`_-style models, through the :class:`MogoFactory` clas
* :func:`~factory.Factory.create()` builds an instance through ``new()`` then
saves it.
+
+MongoEngine
+----
+
+.. currentmodule:: factory.mongoengine
+
+factory_boy supports `MongoEngine`_-style models, through the :class:`MongoEngineFactory` class.
+
+`mongoengine`_ is a wrapper around the ``pymongo`` library for MongoDB.
+
+.. _mongoengine:: http://mongoengine.org/
+
+.. class:: MongoEngineFactory(factory.Factory)
+
+ Dedicated class for `MongoEngine`_ models.
+
+ This class provides the following features:
+
+ * :func:`~factory.Factory.build()` calls a model's ``__init__`` method
+ * :func:`~factory.Factory.create()` builds an instance through ``__init__`` then
+ saves it.
+
+
SQLAlchemy
----------