Changeset 3759
- Timestamp:
- Oct 11, 2006, 5:15:02 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
misc/tools/demos/test_flood_database.py
r3522 r3759 24 24 servlet_base_url = 'http://www-b.ga.gov.au/' 25 25 else: 26 base_url = 'http://www.ga.gov.au /oracle/flood/'27 servlet_base_url = 'http://www.ga.gov.au /'26 base_url = 'http://www.ga.gov.au:8500/oracle/flood/' 27 servlet_base_url = 'http://www.ga.gov.au:8500/' 28 28 29 29 … … 73 73 if line.startswith('<tr><th>Dataset Name</th>') or\ 74 74 line.startswith('<h2>Study title only available.</h2>'): 75 live = True76 break77 75 live = True 76 break 77 78 78 if live is True: 79 79 print 'OK: Link %d is live' %i 80 80 else: 81 print 82 print 'HTML page that failed:', T 83 #for line in T: 84 # print line.strip() 85 81 86 msg = 'FAIL: Link %d is not live: %s' %(i,url) 82 87 raise msg 83 88 84 89 85 # Secon tier links 86 90 # Second tier links 87 91 for j, link in enumerate(get_second_tier_links(T)): 88 92 url = servlet_base_url+htmlmap(link) … … 94 98 live = False 95 99 for line in T: 96 #print line.strip()97 100 if line.startswith('<tr><td><h3>Participants in '): 98 101 live = True … … 102 105 print 'OK: Detail link %d is live (total=%d)' %(j, total_detail) 103 106 else: 104 for line in T: 105 print line.strip() 107 print 108 print 'HTML page that failed:', T 109 #for line in T: 110 # print line.strip() 111 106 112 msg = 'FAIL: Detail link %d is not live (total=%d)' %(j, total_detail) 107 113 raise msg 108 114 109 115 total_detail += 1 110 116 … … 153 159 return(strip(s)) 154 160 155 161 162 print 'Testing main site' 156 163 test_site() 157 164 158 165 print 'Reading html file' 159 166 if b_version is True: 160 167 test_database('flood_studies_all_b.html')
Note: See TracChangeset
for help on using the changeset viewer.