Example #1
0
def test_render_analysis_tags_bad_type():
    tags = {'such plugin': {42: {'color': 'very color', 'value': 'wow'}}}
    with pytest.raises(AttributeError):
        render_analysis_tags(tags)
Example #2
0
def test_render_analysis_tags_success():
    tags = {'such plugin': {'tag': {'color': 'success', 'value': 'wow'}}}
    output = render_analysis_tags(tags)
    assert 'badge-success' in output
    assert '>wow<' in output
Example #3
0
def test_render_analysis_tags_fix():
    tags = {'such plugin': {'tag': {'color': 'very color', 'value': 'wow'}}}
    output = render_analysis_tags(tags)
    assert 'badge-primary' in output
    assert '>wow<' in output
Example #4
0
def test_empty_analysis_tags():
    assert render_analysis_tags(dict()) == ''