Updated Django pyvows (markdown)

rafaelcaricio 2011-08-23 11:51:27 -07:00
parent f5d05c5346
commit 41fc3a92fa

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")
```