示例#1
0
 def test_js_dependencies_are_collected(self):
     d1 = JSSource(src="d1")
     d2 = JSSource(src="d2")
     w = JSSource(src="foo", javascript=[d1,d2])
     js = w.retrieve_resources()['head']
     self.failUnlessEqual(js[0].src, 'd1')
     self.failUnlessEqual(js[1].src, 'd2')
     self.failUnlessEqual(js[2].src, 'foo')
示例#2
0
 def test_js_is_collected_from_JSSource(self):
     w = JSSource(src="foo")
     self.failUnless(w in w.retrieve_resources()['head'])