Exemplo n.º 1
0
    def testRelativeQuery(self):
        data =  "http://localhost:9080/plone/Members/admin/jim?x=5"
        expected = "jim", "?x=5"
        base = 'http://localhost:9080/plone/Members/admin/art1'

        actual = makeUrlRelative(data, base)
        self.assertEquals(actual, expected)
Exemplo n.º 2
0
    def testRelativeQuery(self):
        data = "http://localhost:9080/plone/Members/admin/jim?x=5"
        expected = "jim", "?x=5"
        base = 'http://localhost:9080/plone/Members/admin/art1'

        actual = makeUrlRelative(data, base)
        self.assertEquals(actual, expected)
Exemplo n.º 3
0
    def testRelativeLinks6(self):
        data =  "http://localhost:9080/plone/Members/admin"
        expected = ".", ""
        base = 'http://localhost:9080/plone/Members/admin/art1'

        actual = makeUrlRelative(data, base)
        self.assertEquals(actual, expected)
Exemplo n.º 4
0
    def testRelativeLinks6(self):
        data = "http://localhost:9080/plone/Members/admin"
        expected = ".", ""
        base = 'http://localhost:9080/plone/Members/admin/art1'

        actual = makeUrlRelative(data, base)
        self.assertEquals(actual, expected)
Exemplo n.º 5
0
    def testRelativeLinks4(self):
        data =  "http://localhost:9080/plone/Members/admin/art1"
        expected = "", ""
        base = 'http://localhost:9080/plone/Members/admin/art1'

        self.assertEquals(expected, makeUrlRelative(data, base))
Exemplo n.º 6
0
    def testRelativeLinks3(self):
        data =  "http://localhost/cms/otherfolder/otherdoc"
        expected = "../otherfolder/otherdoc", ""
        base = 'http://localhost/cms/folder/'

        self.assertEquals(expected, makeUrlRelative(data, base))
Exemplo n.º 7
0
    def testRelativeLinks1(self):
        data =  'http://localhost/cms/folder/jim#_ftnref1'
        expected = "jim", "#_ftnref1"
        base = 'http://localhost/cms/folder/fred'

        self.assertEquals(expected, makeUrlRelative(data, base))
Exemplo n.º 8
0
 def test1(self):
     data = 'http://host/site/a'
     base = 'http://host/site/'
     expected = 'a', ''
     self.assertEquals(expected, makeUrlRelative(data, base))
Exemplo n.º 9
0
    def testRelativeLinks4(self):
        data = "http://localhost:9080/plone/Members/admin/art1"
        expected = "", ""
        base = 'http://localhost:9080/plone/Members/admin/art1'

        self.assertEquals(expected, makeUrlRelative(data, base))
Exemplo n.º 10
0
    def testRelativeLinks3(self):
        data = "http://localhost/cms/otherfolder/otherdoc"
        expected = "../otherfolder/otherdoc", ""
        base = 'http://localhost/cms/folder/'

        self.assertEquals(expected, makeUrlRelative(data, base))
Exemplo n.º 11
0
    def testRelativeLinks1(self):
        data = 'http://localhost/cms/folder/jim#_ftnref1'
        expected = "jim", "#_ftnref1"
        base = 'http://localhost/cms/folder/fred'

        self.assertEquals(expected, makeUrlRelative(data, base))
Exemplo n.º 12
0
 def test1(self):
     data = 'http://host/site/a'
     base = 'http://host/site/'
     expected = 'a', ''
     self.assertEquals(expected, makeUrlRelative(data, base))