further updates to fas

This commit is contained in:
Mike McGrath 2009-10-01 13:50:08 -05:00
parent 1ac2f6fc20
commit 6047144357

View file

@ -25,7 +25,7 @@ parser.add_option('-p', '--password',
help = 'Password to connect with (Will prompt if not specified')
parser.add_option('-b', '--baseurl',
dest = 'baseurl',
default = 'https://admin.fedoraproject.org/accounts/',
default = 'https://admin.fedoraproject.org/accounts/login',
metavar = 'baseurl',
help = 'Url to fas (default: %default)')
parser.add_option('-d', '--debug',
@ -46,7 +46,7 @@ del getpass
print
print
print "Starting tests on MirrorManager"
print "Starting tests on FAS"
print " Note: Results shown in terms of test success. Anything not OK should be looked at"
print
@ -77,3 +77,47 @@ else:
print OK
headers.check(r._headers, 3000000)
print 'Testing Links:'
link_list = ['Home', 'My Account', 'New Group', 'Group List', 'Join a Group', 'About']
for link in link_list:
print '\t %s:' % link,
try:
r = b.follow_link(text_regex=r'^%s$' % link)
except LinkNotFoundError:
print FAILED
print OK
headers.check(r._headers, 3000000)
print 'Editing Account:'
r = b.follow_link(text_regex=r'^My Account$')
r = b.follow_link(text_regex=r'edit')
headers.check(r._headers, 3000000)
b.select_form(nr=1)
print '\tHuman Name: %s' % b['human_name']
print '\temail: %s' % b['email']
print '\tTelephone: %s' % b['telephone']
print '\tComments: %s' % b['comments']
old_comments = b['comments']
print '\tChanging Comments Field',
b['comments'] = 'Changing for FAS test by %s' % username
r = b.submit()
print OK
headers.check(r._headers, 4000000)
r = b.follow_link(text_regex=r'edit')
headers.check(r._headers, 3000000)
print '\tVerifying comments field:',
b.select_form(nr=1)
if b['comments'] == 'Changing for FAS test by %s' % username:
print OK
else:
print '%s - Old comment was: %s' % (FAILED - old_comments)
r = b.submit()
headers.check(r._headers, 3000000)
print '\tResetting comments field to old value:',
r = b.follow_link(text_regex=r'edit')
b.select_form(nr=1)
b['comments'] = old_comments
r = b.submit()
print OK
headers.check(r._headers, 4000000)
print "\t**This should have generated an email to you. Please verify that"