def test_get_color_value_method(self): """ Test the ``get_color_value`` method. """ cls = generate_fixed_color_text_cls('customtype') root_tree_node = RootTreeNode() tree_node = root_tree_node.new_child('alert', cls, attrs={}) color_value = tree_node.get_color_value() self.assertEqual('customtype', color_value)
def test_custom_tag_name(self): """ Test the constructor with a custom tag name set. """ cls = generate_fixed_color_text_cls('customtype', canonical_tag_name='foobar') self.assertEqual('customtype', cls.color_value) self.assertEqual('foobar', cls.canonical_tag_name) self.assertEqual((), cls.alias_tag_names)