Changeset 3759


Ignore:
Timestamp:
Oct 11, 2006, 5:15:02 PM (18 years ago)
Author:
ole
Message:

Nothing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • misc/tools/demos/test_flood_database.py

    r3522 r3759  
    2424    servlet_base_url = 'http://www-b.ga.gov.au/'
    2525else:
    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/'   
    2828   
    2929
     
    7373            if line.startswith('<tr><th>Dataset Name</th>') or\
    7474                   line.startswith('<h2>Study title only available.</h2>'):
    75               live = True
    76               break
    77 
     75                live = True
     76                break
     77           
    7878        if live is True:   
    7979            print 'OK: Link %d is live' %i
    8080        else:
     81            print
     82            print 'HTML page that failed:', T
     83            #for line in T:
     84            #    print line.strip()
     85               
    8186            msg = 'FAIL: Link %d is not live: %s' %(i,url)
    8287            raise msg
    8388
    8489
    85         # Secon tier links
    86        
     90        # Second tier links
    8791        for j, link in enumerate(get_second_tier_links(T)):
    8892            url = servlet_base_url+htmlmap(link)
     
    9498            live = False
    9599            for line in T:
    96                 #print line.strip()
    97100                if line.startswith('<tr><td><h3>Participants in '):
    98101                  live = True
     
    102105                print 'OK: Detail link %d is live (total=%d)' %(j, total_detail)
    103106            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                   
    106112                msg = 'FAIL: Detail link %d is not live (total=%d)' %(j, total_detail)
    107113                raise msg
    108            
     114               
    109115            total_detail += 1           
    110116
     
    153159    return(strip(s))
    154160         
    155  
     161
     162print 'Testing main site'
    156163test_site()
    157164
    158 
     165print 'Reading html file'
    159166if b_version is True:
    160167    test_database('flood_studies_all_b.html')
Note: See TracChangeset for help on using the changeset viewer.