🚦 A pyVows extension for testing Django applications.
This repository has been archived on 2023-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2011-12-21 16:38:27 -03:00
django_pyvows fix, if the settings is a threading.local() instance it does not have the items() function, but its iterable through the __dict__ property 2011-12-21 16:38:27 -03:00
vows New version 0.3.9 2011-08-30 11:52:48 -03:00
.gitignore Fix for django context settings 2011-09-14 14:07:09 -03:00
Makefile A way to test admin registration and fixes. 2011-08-29 19:11:44 -03:00
README.md Adding language format to code sample in readme. 2011-08-23 11:18:12 -03:00
requirements.txt Requirements for testing. 2011-08-19 11:19:08 -03:00
setup.py Bugfix e prev version. 2011-08-26 11:10:47 -03:00

Django-Pyvows

Pyvows

pyvows is a BDD (Behaviour Driven Development) inspired by Vows for node.js

More documentation about pyvows can be found at the project homepage

http://pyvows.org

Django-Pyvows

This project contains extensions to test Django projects under pyVows.

Using Django-Pyvows

There is no need to modify your project to use Django-PyVows. You only have to create the vows as you usually would, start the server and call your project urls:

from pyvows import Vows, expect

from django_pyvows.context import DjangoHTTPContext

@Vows.batch
class ContextTest(DjangoHTTPContext):

    def setup(self):
        self.start_server()

    def topic(self):
        return self.get('/mygreaturl/')

    def should_be_a_success(self, topic):
        expect(topic.getcode()).to_equal(200)

    def should_return_the_correct_response_type(self, topic):
        expect(topic.headers.type).to_equal("text/html")

To work you only need to override the get_settings method from DjangoHTTPContext to return the path of your settings module. The default get_settings returns "settings".

More info: https://github.com/rafaelcaricio/django-pyvows/wiki