Beispiel #1
0
 def test_make_absolute_url(self):
     p = Processor()
     eq_(p.make_absolute_url("http://www.com/", "./style.css"), "http://www.com/style.css")
     eq_(p.make_absolute_url("http://www.com", "./style.css"), "http://www.com/style.css")
     eq_(p.make_absolute_url("http://www.com", "//cdn.com/style.css"), "http://cdn.com/style.css")
     eq_(p.make_absolute_url("http://www.com/", "//cdn.com/style.css"), "http://cdn.com/style.css")
     eq_(p.make_absolute_url("http://www.com/", "/style.css"), "http://www.com/style.css")
     eq_(p.make_absolute_url("http://www.com/elsewhere", "/style.css"), "http://www.com/style.css")
     eq_(p.make_absolute_url("http://www.com/elsewhere/", "/style.css"), "http://www.com/style.css")
     eq_(p.make_absolute_url("http://www.com/elsewhere/", "./style.css"), "http://www.com/elsewhere/style.css")
     eq_(p.make_absolute_url("http://www.com/elsewhere", "./style.css"), "http://www.com/style.css")
Beispiel #2
0
 def test_make_absolute_url(self):
     p = Processor()
     eq_(p.make_absolute_url('http://www.com/', './style.css'),
         'http://www.com/style.css')
     eq_(p.make_absolute_url('http://www.com', './style.css'),
         'http://www.com/style.css')
     eq_(p.make_absolute_url('http://www.com', '//cdn.com/style.css'),
         'http://cdn.com/style.css')
     eq_(p.make_absolute_url('http://www.com/', '//cdn.com/style.css'),
         'http://cdn.com/style.css')
     eq_(p.make_absolute_url('http://www.com/', '/style.css'),
         'http://www.com/style.css')
     eq_(p.make_absolute_url('http://www.com/elsewhere', '/style.css'),
         'http://www.com/style.css')
     eq_(p.make_absolute_url('http://www.com/elsewhere/', '/style.css'),
         'http://www.com/style.css')
     eq_(p.make_absolute_url('http://www.com/elsewhere/', './style.css'),
         'http://www.com/elsewhere/style.css')
     eq_(p.make_absolute_url('http://www.com/elsewhere', './style.css'),
         'http://www.com/style.css')
Beispiel #3
0
 def test_make_absolute_url(self):
     p = Processor()
     eq_(
         p.make_absolute_url('http://www.com/', './style.css'),
         'http://www.com/style.css'
     )
     eq_(
         p.make_absolute_url('http://www.com', './style.css'),
         'http://www.com/style.css'
     )
     eq_(
         p.make_absolute_url('http://www.com', '//cdn.com/style.css'),
         'http://cdn.com/style.css'
     )
     eq_(
         p.make_absolute_url('http://www.com/', '//cdn.com/style.css'),
         'http://cdn.com/style.css'
     )
     eq_(
         p.make_absolute_url('http://www.com/', '/style.css'),
         'http://www.com/style.css'
     )
     eq_(
         p.make_absolute_url('http://www.com/elsewhere', '/style.css'),
         'http://www.com/style.css'
     )
     eq_(
         p.make_absolute_url('http://www.com/elsewhere/', '/style.css'),
         'http://www.com/style.css'
     )
     eq_(
         p.make_absolute_url('http://www.com/elsewhere/', './style.css'),
         'http://www.com/elsewhere/style.css'
     )
     eq_(
         p.make_absolute_url('http://www.com/elsewhere', './style.css'),
         'http://www.com/style.css'
     )