Updated Django pyvows (markdown)
parent
a05bd31af8
commit
788ad81d84
1 changed files with 14 additions and 12 deletions
2
Home.md
2
Home.md
|
@ -22,6 +22,7 @@ Using Django-Pyvows
|
||||||
There is no need to modify your project to use Django-PyVows. You only have to create the vows
|
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:
|
as you usually would, start the server and call your project urls:
|
||||||
|
|
||||||
|
```python
|
||||||
from pyvows import Vows, expect
|
from pyvows import Vows, expect
|
||||||
|
|
||||||
from django_pyvows.context import DjangoHTTPContext
|
from django_pyvows.context import DjangoHTTPContext
|
||||||
|
@ -40,6 +41,7 @@ as you usually would, start the server and call your project urls:
|
||||||
|
|
||||||
def should_return_the_correct_response_type(self, topic):
|
def should_return_the_correct_response_type(self, topic):
|
||||||
expect(topic.headers.type).to_equal("text/html")
|
expect(topic.headers.type).to_equal("text/html")
|
||||||
|
```
|
||||||
|
|
||||||
To work you only need to override the `get_settings` method from DjangoHTTPContext to
|
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"`.
|
return the path of your settings module. The default `get_settings` returns `"settings"`.
|
Reference in a new issue