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()
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')
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')