Skip to main content

A nose plugin that automates the creation and teardown of a mongodb instance as part of test runs.

Installation

Grab the package off pypi:

easy_install mongonose

Its automatically picked up via entry points as a nose plugin.

Usage

The plugin extends the nose options with a few options. The only required options are either –mongodb or –mongodb-bin to enable the plugin.

  • –mongodb can be used to enable the mongodb plugin if the mongod

    is on the default pass, else specifying mongodb-bin is nesc, and will also enable the plugin.

  • –mongodb-bin Allows specifying the path to the mongod binary. If not specified the plugin will search the path for a mongodb binary. If one is not found, an error will be raised.

  • –mongodb-port can be optionally set, by default the plugin will utilize a a random open port on the machine.

  • –mongodb-scripting Enables the javascript scripting engine, off by default.

  • –mongodb-logpath Stores the server log at the given path, by default sent to /dev/null

  • –mongodb-prealloc Enables pre-allocation of databases, default is off. Modern filesystems will sparsely allocate, which can speed up test execution.

The plugin will populate the environment variable “TEST_MONGODB” which contains the location to the mongodb server in host:port format.

Tests should use this environment variable value when connecting to mongodb.

Todo

  • support replica sets

Authors

Kapil Thangavelu

Metadata

Release files for mongonose 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mongonose 0.5.2
File Size Uploaded
mongonose-0.5.2.tar.gz 4.2 kB Details

Release files / mongonose-0.5.2.tar.gz

Download URL mongonose-0.5.2.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0bd83508016b6f38866592621e9bb5ccb74901be718fb5a19cb5ea7bb42cbdc4
BLAKE2b-256 checksum
How to use checksums
be31ff0f6119532dbcae0affe05e8af9926005cde3adfccc29951aeb8b98e6ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.2 This release

1 release file

0.5.1

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page