Exemplo n.º 1
0
 def test_max_length_passed_to_formfield(self):
     """
     Test that CronField pass its max_length attributes to
     form fields created using its .formfield() method.
     """
     cf1 = CronField()
     cf2 = CronField(max_length=256)
     self.assertEqual(cf1.formfield().max_length, 120)
     self.assertEqual(cf2.formfield().max_length, 256)
Exemplo n.º 2
0
 def test_max_length_passed_to_formfield(self):
     """
     Test that CronField pass its max_length attributes to
     form fields created using its .formfield() method.
     """
     cf1 = CronField()
     cf2 = CronField(max_length=256)
     self.assertEqual(cf1.formfield().max_length, 120)
     self.assertEqual(cf2.formfield().max_length, 256)
Exemplo n.º 3
0
 def test_widget_passed_to_formfield(self):
     f = CronField()
     self.assertEqual(f.formfield().widget.__class__, CronWidget)
Exemplo n.º 4
0
 def test_widget_passed_to_formfield(self):
     f = CronField()
     self.assertEqual(f.formfield().widget.__class__, CronWidget)