Adding a field to the profile: Difference between revisions

imported>Mark
No edit summary
imported>Mark
Line 397:
'''
* Goes to paulproteus's profile
* checks that they don't already have a birthday that says "19801977-0105-0126"
* clicks edit on the birthday area
* enters a string as birthday
Line 404:
self.login_with_twill()
tc.go(make_twill_url('http://openhatch.org/people/paulproteus/'))
tc.notfind('1980-01-01May 26, 1977')
tc.go(make_twill_url('http://openhatch.org/profile/views/edit_info'))
# make sure our birthday is not already on the form
tc.notfind('19801977-0105-0126')
# set the birthday in the form
tc.fv("edit-tags", 'edit-tags-birthday', '19801977-0105-0126')
tc.submit()
# find the string we just submitted as our birthday
tc.find('19801977-0105-0126')
self.assertEqual(Person.get_by_username('paulproteus').birthday, "19801977-0105-0126")
# now we should see our birthday in the edit form
tc.go(make_twill_url('http://openhatch.org/profile/views/edit_info'))
tc.find('1980-01-01May 26, 1977')
</pre></div>
 
Anonymous user