Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 4
0
 def test_complete_description_required(self):
     event_component = EventForm()
     event_attribute = event_component.fields[
         'complete_description'].required
     self.assertTrue(event_attribute)
Exemplo n.º 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)
Exemplo n.º 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)')
Exemplo n.º 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')
Exemplo n.º 8
0
 def test_event_attribute_required(self):
     event_component = EventForm()
     event_attribute = event_component.fields['event'].required
     self.assertTrue(event_attribute)
Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 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)