コード例 #1
0
ファイル: tests.py プロジェクト: Cyber-Forensic/django-th
 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
ファイル: tests.py プロジェクト: Cyber-Forensic/django-th
 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())