Mercurial > public > sg101
view bio/tests/form_tests.py @ 658:2adf01661ac5
Need to update the Markdown urlize extension too.
For reference, here is where I got it:
https://github.com/r0wb0t/markdown-urlize
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 11 May 2013 16:21:55 -0500 |
parents | 5be850a66dfc |
children |
line wrap: on
line source
""" Form tests for the bio application. """ from django.test import TestCase from bio.forms import EditUserProfileForm class EditUserProfileFormTestCase(TestCase): def test_valid_timezone(self): post_data = {'time_zone': 'US/Central'} form = EditUserProfileForm(post_data) self.assertTrue(form.is_valid()) def test_invalid_timezone(self): post_data = {'time_zone': u'Am\xe9rica/Argentina_/_Buenos_Aires'} form = EditUserProfileForm(post_data) self.assertFalse(form.is_valid()) def test_blank_timezone(self): form = EditUserProfileForm({}) self.assertTrue(form.is_valid())