コード例 #1
0
 def test_DictCharWidget_id_for_label_uses_first_fields_name(self):
     names = [factory.make_string()]
     initials = []
     labels = [factory.make_string()]
     widget = DictCharWidget([widgets.TextInput, widgets.TextInput], names,
                             initials, labels)
     self.assertEqual(" _%s" % names[0], widget.id_for_label(" "))
コード例 #2
0
 def test_DictCharWidget_id_for_label_uses_first_fields_name(self):
     names = [factory.getRandomString()]
     labels = [factory.getRandomString()]
     widget = DictCharWidget(
         [widgets.TextInput, widgets.TextInput], names, labels)
     self.assertEqual(
         ' _%s' % names[0],
         widget.id_for_label(' '))
コード例 #3
0
ファイル: test_config_forms.py プロジェクト: cloudbase/maas
 def test_DictCharWidget_id_for_label_uses_first_fields_name(self):
     names = [factory.getRandomString()]
     labels = [factory.getRandomString()]
     widget = DictCharWidget([widgets.TextInput, widgets.TextInput], names,
                             labels)
     self.assertEqual(' _%s' % names[0], widget.id_for_label(' '))