

@override_settings(STATIC_ROOT='static', MEDIA_ROOT='media', STATIC_URL='http://example.com/static/', MEDIA_URL='http://example.com/media/')
@patch('jingo_minify.helpers.time.time')
@patch('jingo_minify.helpers.os.path.getmtime')
def test_js(getmtime, time):
    getmtime.return_value = 1
    time.return_value = 1
    env = jingo.env
    t = env.from_string("{{ js('common', debug=True) }}")
    s = t.render()
    expected = '\n'.join([('<script src="%s?build=1"></script>' % (settings.STATIC_URL + j)) for j in settings.MINIFY_BUNDLES['js']['common']])
    eq_(s, expected)

dataset/ETHPy150Open jsocol/jingo-minify/jingo_minify/tests.py test_js/original