source: DPPP/kml/csml2kml/python/csml2kml/csml2kml/tests/testUtils.py @ 3684

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/DPPP/kml/csml2kml/python/csml2kml/csml2kml/tests/testUtils.py@3684
Revision 3684, 440 bytes checked in by mkochan, 14 years ago (diff)

Changed wget to return urllib2.HTTPError on retrieval error; changed setup.py to include config files in the csml2kml distribution.

Line 
1import csml2kml.utils
2
3print 'Script loaded. Testing utils.wget() only.'
4n = 10
5print 'Retrieving ' + str(n) + ' times.'
6for i in range(n):
7    content = csml2kml.utils.wget('http://bond.badc.rl.ac.uk:8084/geoserver/wfs?request=getFeature&version=1.1.0&typename=np:Station&maxFeatures=2')
8    if content:
9        # print content
10        print 'Retrieval successful (edit testUtils.py to see it).'
11    else:
12        print 'Retrieval error.'
Note: See TracBrowser for help on using the repository browser.