source: main/waeup.stress/trunk/kofa01/test_scripts/v_user2.py @ 15505

Last change on this file since 15505 was 8692, checked in by uli, 12 years ago

Use the second URL when running in ZEO mode.

File size: 620 bytes
RevLine 
[8654]1import mechanize
2import time
[8692]3from config import register_url, register_url2
[8654]4
5class Transaction(object):
6    def __init__(self):
7        pass
8
9    def run(self):
10        b = mechanize.Browser()
11        b.set_handle_robots(False)
12        start_time = time.time()
[8692]13        resp = b.open(register_url2)
[8654]14        content = resp.read()
15        latency = time.time() - start_time
16        self.custom_timers['Load_Registration_Page'] = latency
17        assert (resp.code == 200), 'Bad Response: HTTP %s' % resp.code
18        return
19
20if __name__ == '__main__':
21    trans = Transaction()
22    trans.run()
23    print trans.custom_timers
Note: See TracBrowser for help on using the repository browser.