def testFromUrl(self): """Creates a FileSubject from an URL """ s = dom.fromUrl("file:///etc/hosts") self.validateSubject(s) self.assertEquals("/etc/hosts", s.fileName)
def testFromUrl(self): """Creates a HttpSubject from an URL """ s = dom.fromUrl("http://localhost") self.validateSubject(s) self.assertEquals("localhost", s.host) self.assertEquals("", s.path) self.assertEquals("GET", s.method)