Updated Django pyvows (markdown)
parent
f5d05c5346
commit
41fc3a92fa
1 changed files with 6 additions and 4 deletions
10
Home.md
10
Home.md
|
@ -59,26 +59,28 @@ from django_pyvows import DjangoContext, DjangoHTTPContext
|
|||
@Vows.batch
|
||||
class ContextTest(DjangoContext):
|
||||
|
||||
class TheDefaultSetting(DjangoHTTPContext):
|
||||
class InDebugMode(DjangoHTTPContext):
|
||||
|
||||
def setup(self):
|
||||
self.settings["DEBUG"] = True
|
||||
self.start_server(port=8081)
|
||||
|
||||
def topic(self):
|
||||
return self.get("/homepage/")
|
||||
|
||||
def should_be_ok(self, topic):
|
||||
expect(topic.code).to_equal("OK")
|
||||
expect(topic.msg).to_equal("OK")
|
||||
|
||||
class TheOtherSetting(DjangoHTTPContext):
|
||||
class NotInDebugMode(DjangoHTTPContext):
|
||||
|
||||
def setup(self):
|
||||
self.settings["DEBUG"] = False
|
||||
self.start_server(port=8082)
|
||||
|
||||
def topic(self):
|
||||
return self.get("/homepage/")
|
||||
|
||||
def should_be_ok(self, topic):
|
||||
expect(topic.code).to_equal("OK")
|
||||
expect(topic.msg).to_equal("OK")
|
||||
|
||||
```
|
Reference in a new issue