Ejemplo n.º 1
0
def test_domain_dispatched_with_service():
    # If we pass a particular service, always return that.
    dispatcher = DomainDispatcherApplication(create_backend_app, service="s3")
    backend_app = dispatcher.get_application(
        {"HTTP_HOST": "s3.us-east1.amazonaws.com"})
    keys = set(backend_app.view_functions.keys())
    keys.should.contain("ResponseObject.key_or_control_response")
Ejemplo n.º 2
0
def test_domain_dispatched():
    dispatcher = DomainDispatcherApplication(create_backend_app)
    backend_app = dispatcher.get_application(
        {"HTTP_HOST": "email.us-east1.amazonaws.com"}
    )
    keys = list(backend_app.view_functions.keys())
    keys[0].should.equal("EmailResponse.dispatch")
Ejemplo n.º 3
0
def test_domain_dispatched_with_service():
    # If we pass a particular service, always return that.
    dispatcher = DomainDispatcherApplication(create_backend_app, service="s3")
    backend_app = dispatcher.get_application(
        {"HTTP_HOST": "s3.us-east1.amazonaws.com"})
    keys = set(backend_app.view_functions.keys())
    keys.should.contain('ResponseObject.key_response')
Ejemplo n.º 4
0
def test_domain_dispatched():
    dispatcher = DomainDispatcherApplication(create_backend_app)
    backend_app = dispatcher.get_application("email.us-east1.amazonaws.com")
    keys = list(backend_app.view_functions.keys())
    keys[0].should.equal('EmailResponse.dispatch')
Ejemplo n.º 5
0
def test_domain_dispatched_with_service():
    # If we pass a particular service, always return that.
    dispatcher = DomainDispatcherApplication(create_backend_app, service="s3")
    backend_app = dispatcher.get_application("s3.us-east1.amazonaws.com")
    backend_app.view_functions.keys()[0].should.equal(
        'ResponseObject.key_response')
Ejemplo n.º 6
0
def test_domain_dispatched():
    dispatcher = DomainDispatcherApplication(create_backend_app)
    backend_app = dispatcher.get_application("email.us-east1.amazonaws.com")
    backend_app.view_functions.keys()[0].should.equal('EmailResponse.dispatch')