Nose plugin for testing Google App Engine application. Designed for the Ferris Framework but should work for any App Engine app.


License
Apache-2.0
Install
pip install FerrisNose==2.1.2

Documentation

Ferris Nose

A nose plugin for testing Google App Engine applications. Built for the Ferris Framework but can be used for testing any app engine application.

Originally based on nose-gunit.

Installation

Install the latest version via pip:

(sudo) pip install --upgrade ferrisnose

Running Tests

Run nosetests with the --with-ferris flag.

nosetests --with-ferris app/tests

Note that this must be in the root of your project. If no path is provided the 'app/tests' is assumed.

If you get an error that it couldn't find the app engine sdk, then specify it using the --gae-sdk-path flag.

nosetests --with-ferris --gae-sdk-path=/opt/gae app/tests

You can also set the APPENGINE_SDK_PATH environment variable.

Writing Tests

For Ferris apps, see the testing documentation.

For non-Ferris apps, create your test cases and inherit from ferrisnose.AppEngineTest:

from ferrisnose import AppEngineTest

class TestPosts(AppEngineTest):
    def test_creation(self):
        post = Post(title="Hello!")
        post.put()

        assert Post.query().count() == 1

You can log-in users using the self.login_user(email, admin=False) and run deferred tasks using self.run_deferred_tasks(queue='default'.

Additionally, there is a AppEngineWebTest class that provides a webtest instance at self.testapp.