Пример #1
0
 def test_complete_description_attribute_widget_placeholder(self):
     event_component = EventForm()
     event_attribute = event_component.fields[
         'complete_description'].widget.attrs['placeholder']
     self.assertEqual(event_attribute,
                      'tell us what\'s your event sounds like')
Пример #2
0
 def test_complete_description_attribute_widget_id(self):
     event_component = EventForm()
     event_attribute = event_component.fields[
         'complete_description'].widget.attrs['id']
     self.assertEqual(event_attribute, 'complete-description')
Пример #3
0
 def test_complete_description_attribute_widget_class(self):
     event_component = EventForm()
     event_attribute = event_component.fields[
         'complete_description'].widget.attrs['class']
     self.assertEqual(event_attribute, 'form-control')
Пример #4
0
 def test_complete_description_required(self):
     event_component = EventForm()
     event_attribute = event_component.fields[
         'complete_description'].required
     self.assertTrue(event_attribute)
Пример #5
0
 def test_complete_description_max_length(self):
     event_component = EventForm()
     event_attribute = event_component.fields[
         'complete_description'].max_length
     self.assertEqual(event_attribute, 2000)
Пример #6
0
 def test_brief_description_attribute_widget_placeholder(self):
     event_component = EventForm()
     event_attribute = event_component.fields[
         'brief_description'].widget.attrs['placeholder']
     self.assertEqual(event_attribute,
                      'share your event tagline (maximum 200 characters)')
Пример #7
0
 def test_brief_description_attribute_widget_autocomplete(self):
     event_component = EventForm()
     event_attribute = event_component.fields[
         'brief_description'].widget.attrs['autocomplete']
     self.assertEqual(event_attribute, 'off')
Пример #8
0
 def test_event_attribute_required(self):
     event_component = EventForm()
     event_attribute = event_component.fields['event'].required
     self.assertTrue(event_attribute)
Пример #9
0
 def test_event_attribute_widget_autocomplete(self):
     event_component = EventForm()
     event_attribute = event_component.fields['event'].widget.attrs[
         'autocomplete']
     self.assertEqual(event_attribute, 'off')
Пример #10
0
 def test_event_attribute_widget_placeholder(self):
     event_component = EventForm()
     event_attribute = event_component.fields['event'].widget.attrs[
         'placeholder']
     self.assertEqual(event_attribute, 'input your event here')
Пример #11
0
 def test_event_attribute_widget_id(self):
     event_component = EventForm()
     event_attribute = event_component.fields['event'].widget.attrs['id']
     self.assertEqual(event_attribute, 'event')
Пример #12
0
 def test_event_attribute_max_length(self):
     event_component = EventForm()
     event_attribute = event_component.fields['event'].max_length
     self.assertEqual(event_attribute, 50)