def test_valid_consumer_form(self): """ test if that form is a valid consumer one """ d = self.create_pelican() data = {'name': d.name, 'title': 'Foobar WebSite', 'url': 'http://www.google.com', 'tags': 'tag1, tag2', 'category': 'internet', 'path': '/home/triggerhappy/pelican'} form = PelicanConsumerForm(data=data) self.assertTrue(form.is_valid())
def test_invalid_consumer_form(self): """ test if that form is not a valid consumer one """ form = PelicanConsumerForm(data={}) self.assertFalse(form.is_valid())