示例#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)
示例#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)