Esempio n. 1
0
def test_custom_class_ident_style_and_attrs():
    assert (
        str(
            Table(striped=True,
                  bordered=True,
                  cl='abclass',
                  ident='123',
                  style="font-size:0.9em;",
                  attrs={"data-test": 'abc'})) ==
        "<table id=\"123\" class=\"table table-striped table-bordered abclass\" style=\"font-size:0.9em;\" data-test=\"abc\"></table>"
    )
Esempio n. 2
0
def test_table():
    p = Panel(title="TITLE")
    p.settable(Table(hover=True))
    assert(str(p) == "<div class=\"panel panel-default\"><div class=\"panel-heading\">TITLE</div><div class=\"panel-body\"></div><table class=\"table table-hover\"></table></div>")
Esempio n. 3
0
def test_striped():
    assert (str(Table(
        striped=True)) == "<table class=\"table table-striped\"></table>")
Esempio n. 4
0
def test_basic():
    assert (str(Table()) == "<table class=\"table\"></table>")
Esempio n. 5
0
def test_responsive():
    assert (
        str(Table(striped=True, responsive=True)) ==
        "<div class=\"table-responsive\"><table class=\"table table-striped\"></table></div>"
    )
Esempio n. 6
0
def test_hover():
    assert (str(
        Table(hover=True)) == "<table class=\"table table-hover\"></table>")
Esempio n. 7
0
def test_condensed():
    assert (str(Table(
        condensed=True)) == "<table class=\"table table-condensed\"></table>")
Esempio n. 8
0
def test_bordered():
    assert (str(Table(
        bordered=True)) == "<table class=\"table table-bordered\"></table>")