예제 #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)