Ejemplo n.º 1
0
 def _virtual_path_element_to_span(hid_element: str, uid_element, root_uid) -> str:
     if is_uid(uid_element):
         return (
             '<span class="badge badge-primary">'
             '    <a style="color: #fff" href="/analysis/{uid}/ro/{root_uid}">'
             '        {hid}'
             '    </a>'
             '</span>'.format(uid=uid_element, root_uid=root_uid, hid=cap_length_of_element(hid_element))
         )
     return '<span class="badge badge-secondary">{}</span>'.format(cap_length_of_element(hid_element))
Ejemplo n.º 2
0
def test_cap_length_of_element_default(element_in, element_out):
    assert cap_length_of_element(element_in) == element_out