Changeset 3481 for tools/demos/test_flood_database.py
- Timestamp:
- Aug 10, 2006, 1:54:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/demos/test_flood_database.py
r3207 r3481 45 45 fid = open(filename) 46 46 47 for link in get_individual_studies(fid.readlines()): 47 total_detail = 0 48 for i, link in enumerate(get_individual_studies(fid.readlines())): 48 49 url = base_url+htmlmap(link) 49 50 50 51 live = False 51 print 'Testing %s...' %link[:72],52 print 'Testing link %d: %s...' %(i, link[:72]), 52 53 T = get_page(url) 53 54 … … 60 61 61 62 if live is True: 62 print 'OK: Link is live'63 print 'OK: Link %d is live' %i 63 64 else: 64 msg = 'FAIL: Link is not live: %s' %url65 msg = 'FAIL: Link %d is not live: %s' %(i,url) 65 66 raise msg 66 67 67 68 68 # Secon tier links 69 for link in get_second_tier_links(T): 69 # Secon tier links 70 71 for j, link in enumerate(get_second_tier_links(T)): 70 72 url = servlet_base_url+htmlmap(link) 71 73 72 74 live = False 73 print 'Testing %s...' %link[:80],75 print 'Testing detail %d: %s...' %(j, link[:80]), 74 76 T = get_page(url) 75 77 … … 82 84 83 85 if live is True: 84 print 'OK: Detail link is live'86 print 'OK: Detail link %d is live (total=%d)' %(j, total_detail) 85 87 else: 86 88 for line in T: 87 89 print line.strip() 88 msg = 'FAIL: Detail link is not live'89 printmsg90 msg = 'FAIL: Detail link %d is not live (total=%d)' %(j, total_detail) 91 raise msg 90 92 93 total_detail += 1 91 94 92 95
Note: See TracChangeset
for help on using the changeset viewer.