示例#1
0
 def test_form_item_with_placeholder_and_css(self):
     """
     Test that the form returns a placeholder and css in the html response.
     """
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#2
0
    def test_form_item_input_has_placeholder_and_css_classes(self):

        form = ItemForm()

        self.assertIn('placeholder="Enter a to-do item"', form.as_p())

        self.assertIn('class="form-control input-lg"', form.as_p())
示例#3
0
 def test_form_renders_item_text_input(self):
     # list1 = List.objects.create()
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-group-lg"', form.as_p())
     # print(form.instance.text)
     self.assertEqual(form.instance.list_id, None)
示例#4
0
 def test_form_renders_item_text_input(self):
     """
     tests that the form renders the item text
     """
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
 def test_form_item_input_has_placeholder_and_css_classes(self):
     """
     测试表单是否包含了 placehodler 属性以及 class 属性
     :return:
     """
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#6
0
 def test_form_renders_item_text_input(self):
     '''
     Instantiate ItemForm, validate that the template passed
     the right information. as_p outputs what the form is, if it 
     were surrounded in <p> tags
     '''
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#7
0
    def test_form_item_input_has_placeholder_and_css_classes(self):
        """
        Is the form being rendered correctly? With all the required items?
        """
        form = ItemForm()

        # Do we have a placeholder?
        self.assertIn('placeholder="Enter a to-do item"', form.as_p())
        # Do we use the right css class?
        self.assertIn('class="form-control input-lg"', form.as_p())
示例#8
0
 def test_form_item_input_has_placeholder_and_css_classes(self) -> None:
     """Test correct styling of forms."""
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#9
0
 def test_form_item_input_has_placeholder_and_css_classes(self):
     form = ItemForm()
     self.assertIn('placeholder="Wpisz rzecz do zrobienia"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#10
0
 def test_itemform_renders_item_text_input(self):
     form = ItemForm()
     self.fail(form.as_p())
示例#11
0
 def test_form_item_input_has_placeholder_and_css_classes(self):
     ''' 测试表单输入框的属性包含placeholder和class '''
     form = ItemForm()
     self.assertIn('placeholder="输入一个待办事项"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#12
0
 def test_form_renders_text_input(self):
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
示例#13
0
文件: test_forms.py 项目: donnerc/tdd
 def test_form_item_input_has_placeholder_and_css_classes(self):
     form = ItemForm()
     self.assertIn('placeholder="Saisir votre tâche ici"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#14
0
 def test_form_item_input_has_placeholder_and_css_classes(self):
     form = ItemForm()
     self.assertIn('placeholder="Add your quote here..."', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#15
0
 def test_form_item_input_has_placeholder_and_css(self):
     form = ItemForm()
     self.assertIn(f'placeholder="{INPUT_PLACEHOLDER}"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#16
0
文件: test_forms.py 项目: gulby/tdd
 def test_form_item_input_has_placeholder_and_css_classes(self):
     form = ItemForm()
     self.assertIn(u'placeholder="작업 아이템 입력"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#17
0
 def test_form_item_input_has_placeholder_and_css_classes(self):
     form = ItemForm()
     self.assertIn('placeholder="Nueva Tarea a realizar"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#18
0
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     self.assertIn('Enter a to-do item', form.as_p())
     self.assertIn('form-control input-lg', form.as_p())
示例#19
0
 def test_form_item_input_has_placeholder_and_css_selector(self):
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
示例#20
0
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('id="id_text"', form.as_p())
示例#21
0
 def test_form_with_some_text(self):
     form = ItemForm(data={'text': 'Buy milk'})
     self.assertTrue(form.is_valid())
     self.assertIn('Buy milk', form.as_p())
示例#22
0
 def test_form_renders_item_text_input(self):
     """test: form displays input text field"""
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     self.assertIn('Enter a to-do item', form.as_p())
     self.assertIn('form-control input-lg', form.as_p())
示例#24
0
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     self.fail(form.as_p()) #renders form as HTML
示例#25
0
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     print(form.as_p())
示例#26
0
 def test_form_renders_text_input(self):
     form = ItemForm()
     self.fail(form.as_p())  # this will display autogenerated HTML
示例#27
0
 def test_form_renders_text_input(self):
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-controll input-lg"', form.as_p())
示例#28
0
 def test_form_item_input_has_placeholder_and_css_classes(self):
     form = ItemForm()
     self.assertIn('placeholder="Enter a word"', form.as_p())
     self.assertIn('class="form-control pure-input-1"', form.as_p())
 def test_form_render_item_text_input(self):
     '''тест: форма отображает текстовое поле ввода'''
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#30
0
    def test_form_renders_text_input(self):
        form = ItemForm()

        self.assertIn('placeholder="작업 아이템 입력"', form.as_p())
        self.assertIn('class="form-control input-lg"', form.as_p())
示例#31
0
 def test_from_renders_item_text_input(self):
     form = ItemForm()
     print(form.as_p())
 def test_form_renders_item_text_input(self):  # pylint: disable=C0103
     """ Item is a text input. """
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#33
0
    def test_form_renders_item_text_input(self):
        form = ItemForm()
        html_source = form.as_p()

        self.assertIn('placeholder="Enter a to-do item"', html_source)
        self.assertIn('class="form-control input-lg"', html_source)
示例#34
0
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     self.fail(form.as_p())  # generowanie formularza jako kodu html
示例#35
0
 def test_form_item_input_has_placeholder_and_css_selector(self):
     form = ItemForm()
     self.assertIn('placeholder="작업아이템입력"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#36
0
 def test_form_item_input_has_placeholder_and_css_classes(self):
     """тест: поле ввода имеет атрибут placeholder и css-классы"""
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#37
0
 def test_form_item_input_has_placeholder_and_css_classes(self):
     form = ItemForm()
     self.assertIn('placeholder="So What-cha What-cha What-cha Want?"',
                   form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
    def test_form_renders_item_text_input(self):
        form = ItemForm()

        self.assertIn('placeholder="Type task item"', form.as_p())
        self.assertIn('class="form-control input-lg"', form.as_p())
示例#39
0
 def test_form_renders_item_iput_has_placeholder_and_css_classes(self):
     form = ItemForm()
     self.assertIn('placeholder="Entre com um item na lista"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#40
0
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     self.assertIn('placeholder="Input your items here"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#41
0
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     assert 'placeholder="Enter a to-do item"' in form.as_p()
     assert 'class="form-control input-lg"' in form.as_p()
示例#42
0
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#43
0
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     #self.fail(form.as_p()) #renders form as html
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
示例#44
0
 def test_forms_item_input_has_placeholder_and_css_classes(self):
     form = ItemForm()
     self.assertIn('placeholder="Enter a to-do item"', form.as_p())
     self.assertIn('class="form-control input-lg"', form.as_p())
 def test_form_renders_item_text_input(self):
     form = ItemForm()
     data = form.as_p()
     assert 'placeholder="Enter a to-do item"' in data
     assert 'class="form-control input-lg"' in data