Example #1
0
def test_session_options():
    """Test that http sessions receive proper options."""
    auth = ('foo', 'bar')
    session_manager.set_session_options(auth=auth)
    try:
        session = session_manager.create_session()
        assert session.auth == auth
    finally:
        session_manager.set_session_options()
Example #2
0
def test_session_options():
    """Test that http sessions receive proper options."""
    auth = ('foo', 'bar')
    session_manager.set_session_options(auth=auth)
    try:
        session = session_manager.create_session()
        assert session.auth == auth
    finally:
        session_manager.set_session_options()
Example #3
0
def test_session():
    """Test that http sessions contain the proper user agent."""
    session = session_manager.create_session()
    resp = session.get(
        'http://thredds-test.unidata.ucar.edu/thredds/catalog.xml')
    assert resp.request.headers['user-agent'].startswith('Siphon')
Example #4
0
def test_session():
    """Test that http sessions contain the proper user agent."""
    session = session_manager.create_session()
    resp = session.get('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml')
    assert resp.request.headers['user-agent'].startswith('Siphon')