def test_dataset_parsing_tds5(recwarn): """Test parsing the dataset from TDS 5.""" url = ('http://thredds-test.unidata.ucar.edu/thredds/ncss/grid/casestudies/irma/model/' 'gfs/GFS_Global_0p5deg_20170903_1200.grib2/dataset.xml') element = ET.fromstring(session_manager.urlopen(url).read()) NCSSDataset(element) assert len(recwarn) == 0
def test_dataset_elements_full_ncss_station(): """Test parsing the dataset from a full ncss station page.""" url = ('http://thredds.ucar.edu/thredds/ncss/nws/synoptic/' 'ncdecoded/Surface_Synoptic_Point_Data_fc.cdmr/dataset.xml') element = ET.fromstring(session_manager.urlopen(url).read()) parsed = NCSSDataset(element) assert parsed
def test_dataset_elements_full_ncss_grid(): """Test parsing the dataset from a full ncss grid page.""" url = ('http://thredds.ucar.edu/thredds/ncss/grib/NCEP/GFS/' 'Global_0p5deg/GFS_Global_0p5deg_20150602_0000.grib2/' 'dataset.xml') element = ET.fromstring(session_manager.urlopen(url).read()) parsed = NCSSDataset(element) assert parsed
def test_urlopen(): """Test siphon's urlopen wrapper.""" fobj = session_manager.urlopen( 'http://thredds-test.unidata.ucar.edu/thredds/catalog.xml') assert fobj.read(2) == b'<?'
def get_header_remote(): """Get a header from a remote data source.""" from siphon.http_util import session_manager return session_manager.urlopen(get_test_latest_url('req=header'))
def test_urlopen(): """Test siphon's urlopen wrapper.""" fobj = session_manager.urlopen('http://thredds-test.unidata.ucar.edu/thredds/catalog.xml') assert fobj.read(2) == b'<?'