Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added page for documenting mongomock. Updated docs/guide/index.rst
  • Loading branch information
moonso committed Dec 6, 2015
1 parent 713af13 commit a388670
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/guide/index.rst
Expand Up @@ -13,3 +13,4 @@ User Guide
gridfs
signals
text-indexes
mongomock
21 changes: 21 additions & 0 deletions docs/guide/mongomock.rst
@@ -0,0 +1,21 @@
==============================
Use mongomock for testing
==============================

`mongomock <https://github.com/vmalloc/mongomock/>`_ is a package to do just
what the name implies, mocking a mongo database.

To use with mongoengine, simply specify mongomock when connecting with
mongoengine:

.. code-block:: python
connect('mongoenginetest', host='mongomock://localhost')
conn = get_connection()
or with an alias:

.. code-block:: python
connect('mongoenginetest', host='mongomock://localhost', alias='testdb')
conn = get_connection('testdb)

0 comments on commit a388670

Please sign in to comment.