示例#1
0
 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())
示例#2
0
 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())
示例#3
0
 def test_invalid_consumer_form(self):
     """
        test if that form is not a valid consumer one
     """
     form = PelicanConsumerForm(data={})
     self.assertFalse(form.is_valid())
示例#4
0
 def test_invalid_consumer_form(self):
     """
        test if that form is not a valid consumer one
     """
     form = PelicanConsumerForm(data={})
     self.assertFalse(form.is_valid())