def test_fontawesome_external_min():
    from tw2.fontawesome import fontawesome_css
    from tw2.fontawesome.config import version
    fontawesome_css = fontawesome_css(external=True, variant='min')
    the_link = (
        "//maxcdn.bootstrapcdn.com/font-awesome/%(version)s/css/"
        "font-awesome.min.css" % {'version': version})
    eq_(fontawesome_css.req().link, the_link)
Exemple #2
0
def test_fontawesome_external_min():
    from tw2.fontawesome import fontawesome_css
    from tw2.fontawesome.config import version
    fontawesome_css = fontawesome_css(external=True, variant='min')
    the_link = ("//maxcdn.bootstrapcdn.com/font-awesome/%(version)s/css/"
                "font-awesome.min.css" % {
                    'version': version
                })
    eq_(fontawesome_css.req().link, the_link)
def test_fontawesome_custom():
    from tw2.fontawesome import fontawesome_css
    fontawesome_css = fontawesome_css()
    the_link = "/foo/bar/fontawesome.css"
    fontawesome_css.link = the_link
    eq_(fontawesome_css.req().link, the_link)
def test_fontawesome_scriptname():
    twc.core.request_local()['middleware'] = twc.make_middleware(
            script_name='/foo')
    from tw2.fontawesome import fontawesome_css
    the_link = "/foo/resources/tw2.fontawesome/static/css/font-awesome.css"
    eq_(fontawesome_css.req().link, the_link)
def test_fontawesome_resource_min():
    from tw2.fontawesome import fontawesome_css
    fontawesome_css = fontawesome_css(variant='min')
    the_link = "/resources/tw2.fontawesome/static/css/font-awesome.min.css"
    eq_(fontawesome_css.req().link, the_link)
def test_fontawesome_resource():
    from tw2.fontawesome import fontawesome_css
    the_link = "/resources/tw2.fontawesome/static/css/font-awesome.css"
    eq_(fontawesome_css.req().link, the_link)
Exemple #7
0
def test_fontawesome_custom():
    from tw2.fontawesome import fontawesome_css
    fontawesome_css = fontawesome_css()
    the_link = "/foo/bar/fontawesome.css"
    fontawesome_css.link = the_link
    eq_(fontawesome_css.req().link, the_link)
Exemple #8
0
def test_fontawesome_scriptname():
    twc.core.request_local()['middleware'] = twc.make_middleware(
        script_name='/foo')
    from tw2.fontawesome import fontawesome_css
    the_link = "/foo/resources/tw2.fontawesome/static/css/font-awesome.css"
    eq_(fontawesome_css.req().link, the_link)
Exemple #9
0
def test_fontawesome_resource_min():
    from tw2.fontawesome import fontawesome_css
    fontawesome_css = fontawesome_css(variant='min')
    the_link = "/resources/tw2.fontawesome/static/css/font-awesome.min.css"
    eq_(fontawesome_css.req().link, the_link)
Exemple #10
0
def test_fontawesome_resource():
    from tw2.fontawesome import fontawesome_css
    the_link = "/resources/tw2.fontawesome/static/css/font-awesome.css"
    eq_(fontawesome_css.req().link, the_link)