Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(0)  |  Derive(11)  |  Import(3)

src/d/j/django-pyvows-HEAD/vows/context_vows.py   django-pyvows(Download)
from pyvows import Vows, expect
 
from django_pyvows.context import DjangoContext, DjangoHTTPContext
 
@Vows.batch
        class TheHost(DjangoHTTPContext):
 
            def topic(self):
                return self.host
 
            def should_return_an_error(self, topic):
                expect(topic).to_be_an_error_like(ValueError)
 
        class ThePort(DjangoHTTPContext):
    class WithinAServer(DjangoHTTPContext):
 
        def setup(self):
            self.start_server(port=8085)
 
        def should_default_to_one_thread(self,topic):
            expect(self.server.thr.server._get_numthreads()).to_equal(1)
 
        class WithinDjangoHTTPContextTheGetUrlMethod(DjangoHTTPContext):

src/d/j/django-pyvows-HEAD/vows/settings_vows.py   django-pyvows(Download)
from pyvows import Vows, expect
 
from django_pyvows.context import DjangoContext, DjangoHTTPContext
from django_pyvows.settings_manager import settings_tracker, VowsSettings
 
    class CannotSayHelloWithoutName(DjangoHTTPContext):
 
        def topic(self):
            self.start_server(port=9000, settings={
                'SAY_HELLO_WITHOUT_NAME': False
    class SayHelloWithoutName(DjangoHTTPContext):
 
        def topic(self):
            self.start_server(port=9001, settings={
                'SAY_HELLO_WITHOUT_NAME': True

src/d/j/django-pyvows-HEAD/vows/server_vows.py   django-pyvows(Download)
import httplib2
 
from django_pyvows.context import DjangoContext, DjangoHTTPContext
from django_pyvows.assertions import *
 
class HttpContextVows(DjangoHTTPContext):
 
    def topic(self):
        self.start_server()
        return self.get("/")