Ejemplo n.º 1
0
    def testFromUrl(self):
        """Creates a FileSubject from an URL
        """

        s = dom.fromUrl("file:///etc/hosts")

        self.validateSubject(s)

        self.assertEquals("/etc/hosts", s.fileName)
Ejemplo n.º 2
0
    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)