Beispiel #1
0
 def create_first_paragraph(self):
     first_paragraph_kwargs = dict()
     first_paragraph_kwargs['text_node'] = TextNode('Hello World!')
     first_paragraph_kwargs['class'] = 'first'
     first_paragraph_kwargs['useful'] = 'true'
     first_paragraph_kwargs['toremove'] = 'remove_this'
     self.first_paragraph = HTMLTag('p', first_paragraph_kwargs)
Beispiel #2
0
 def _text_node_test(self):
     self.first_paragraph.text_node = TextNode('Hello World!')
     self.first_paragraph.text_node.text = 'Hello World! -- changed to!'
     self.first_paragraph.text_node = TextNode(
         'Hello World! -- changed to!')
     self.first_paragraph.text_node = TextNode('Hello World! -- changed!')
     self.first_paragraph += [TextNode('A'), TextNode('B'), TextNode('C')]
     self.first_paragraph[-3:] = []
Beispiel #3
0
 def on_not_authenticated(self):
     if 'valid' in self:
         del self.invalid
     self.invalid = HTMLTag('p',
                            TextNode('username and/or password is invalid'))
     self._test_remove_event_argument()
Beispiel #4
0
 def on_authenticated(self):
     if 'invalid' in self:
         del self.invalid
     self.valid = HTMLTag('p', TextNode('username and password is valid'))
     self._test_replace_event()
Beispiel #5
0
 def on_focus(self, theLoginButton, msg):
     if msg['event']['target'] != self.test_login_button.id:
         raise Error('on_focus target "%s" != test_login_button id "%s"' %
                     (msg['event']['target'], self.test_login_button.id))
     self.focus_found = HTMLTag('p', TextNode('on focus event returned'))
Beispiel #6
0
 def sub_paragraph_child(self):
     text_child = TextNode('Hello World! -- from the sub paragraph')
     return HTMLTag('p', text_child)
Beispiel #7
0
    def on_create(self, name, parentNode, index):
        super(TodosItem, self).on_create(name, parentNode, index)

        self._ItemInfo.item_text = TextNode(self._item_text)