Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/m/e/mediadrop-HEAD/mediadrop/lib/tests/js_delivery_test.py   mediadrop(Download)
    def test_can_add_a_script(self):
        scripts = Scripts()
        scripts.add(Script('/foo.js'))
        assert_length(1, scripts)
 
    def test_does_not_add_duplicate_scripts(self):
        scripts = Scripts()
        scripts.add(Script('/foo.js'))
        scripts.add(Script('/foo.js'))
        assert_length(1, scripts)
 
    def test_uses_non_async_if_conflicting_variants_are_added(self):
        scripts = Scripts()
        scripts.add(Script('/foo.js', async=True))
        assert_true(scripts.scripts[0].async)
 
        scripts.add(Script('/foo.js'))
        assert_length(1, scripts)
        assert_false(scripts.scripts[0].async)