Example #1
0
def test_get_html():
    assert get_html('astring') == 'astring'
    assert get_html(1.2) == '1.2'
    assert get_html(100) == '100'
    # Complex object without __str__ implementation, expect repr-like
    assert get_html(AclTrace()) == 'AclTrace(events=[])'
Example #2
0
 def _repr_html_(self):
     # type: () -> str
     result = "<br><br>".join([get_html(element) for element in self])  # type: str
     return result
Example #3
0
def test_get_html():
    assert get_html("astring") == "astring"
    assert get_html(1.2) == "1.2"
    assert get_html(100) == "100"
    # Complex object without __str__ implementation, expect repr-like
    assert get_html(AclTrace()) == "AclTrace(events=[])"