Adding a field to the profile: Difference between revisions

imported>Mark
No edit summary
imported>Mark
Line 388:
* Save the changes
* bring up the profile and verify the birthday is still there.
** Note: Django will format the date as Jan.May 126, 19801977
 
<div class="example"><pre>
Line 395:
 
def test(self):
'''
* Goes to paulproteus's profile
* checks that they don't already have a birthday that says "1977-05-26"
Line 411:
tc.fv("edit-tags", 'edit-tags-birthday', '1977-05-26')
tc.submit()
# find the string we just submitted as our self.assertEqual(Person.get_by_username('paulproteus').birthday,
tc datetime.finddate('1977-05-, 5, 26'))
self.assertEqual(Person.get_by_username('paulproteus').birthday, "1977-05-26")
# now we should see our birthday in the edit form
tc.go(make_twill_url('http://openhatch.org/profile/views/edit_info'))
tc.find('May 26, 1977-05-26')
 
</pre></div>
 
Line 422:
<div class="example"><pre>
$ bin/mysite test profile.EditBirthday
 
<test information will print here...>
 
Installed 12 object(s) from 1 fixture(s)
sh: /usr/sbin/postmap: not found
.
----------------------------------------------------------------------
Ran 1 test in 8.578s
 
OK
Destroying test database 'default'...
 
</pre></div>
Anonymous user