def test_form_accepts_default_payload(self): form = ProfileForm({ 'availability': Profile.NO_AVAILABILITY, 'first_name': 'someone', 'slug': 'foo', }) ok_(form.is_valid())
def test_form_receives_valid_values(self): form = ProfileForm({ 'first_name': 'John', 'last_name': 'Donne', 'bio': 'English poet, satirist and lawyer.', 'website': 'http://en.wikipedia.org/wiki/John_Donne', }) ok_(form.is_valid())
def test_form_accepts_empty_values(self): form = ProfileForm({ 'first_name': '', 'last_name': '', 'bio': '', 'website': '', }) ok_(form.is_valid())
def test_form_accepts_empty_values(self): form = ProfileForm({ 'name': '', 'bio': '', 'website': '', 'availability': Profile.NO_AVAILABILITY, }) ok_(form.is_valid())
def test_form_receives_valid_values(self): form = ProfileForm({ 'name': 'John Donne', 'bio': 'English poet, satirist and lawyer.', 'website': 'http://en.wikipedia.org/wiki/John_Donne', 'availability': Profile.NO_AVAILABILITY, }) ok_(form.is_valid())
def test_form_accepts_empty_payload(self): form = ProfileForm({}) ok_(form.is_valid())
def test_form_accepts_default_payload(self): form = ProfileForm({ 'availability': Profile.NO_AVAILABILITY, }) ok_(form.is_valid())