Gentoo Archives: gentoo-commits

From: "Ali Polatel (hawking)" <hawking@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/gdata/files: gdata-1.0.8-test-fix.patch
Date: Fri, 28 Mar 2008 06:47:18
Message-Id: E1Jf8Ms-0002PW-Vp@stork.gentoo.org
1 hawking 08/03/28 06:47:14
2
3 Added: gdata-1.0.8-test-fix.patch
4 Log:
5 Add patch from upstream to fix tests. Bug 212983
6 (Portage version: 2.1.4.4)
7
8 Revision Changes Path
9 1.1 dev-python/gdata/files/gdata-1.0.8-test-fix.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gdata/files/gdata-1.0.8-test-fix.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gdata/files/gdata-1.0.8-test-fix.patch?rev=1.1&content-type=text/plain
13
14 Index: gdata-1.0.8-test-fix.patch
15 ===================================================================
16 --- gdata.py-1.0.8/tests/atom/service_test.py 2007-07-21 00:25:54.000000000 +0300
17 +++ gdata.py-1.0.8/tests/atom/service_test.py 2008-03-28 08:40:16.044330089 +0200
18 @@ -69,7 +69,7 @@
19 self.assertEquals(ssl, False)
20 self.assertEquals(host, 'www.google.com')
21 self.assertEquals(port, 80)
22 - self.assertEquals(path, 'http://www.google.com:80/service/subservice?name=value')
23 + self.assertEquals(path, '/service/subservice?name=value')
24
25 def testParseHttpUrlWithPort(self):
26 as = atom.service.AtomService('code.google.com')
27 @@ -81,7 +81,7 @@
28 self.assertEquals(host, 'www.google.com')
29 self.assertEquals(port, 12)
30 #self.assertEquals(path, '/service/subservice?name=value&newname=newvalue')
31 - self.assertEquals(path, 'http://www.google.com:12/service/subservice?name=value&newname=newvalue')
32 + self.assertEquals(path, '/service/subservice?name=value&newname=newvalue')
33
34 def testParseHttpsUrl(self):
35 as = atom.service.AtomService('code.google.com')
36 @@ -92,7 +92,7 @@
37 self.assertEquals(ssl, True)
38 self.assertEquals(host, 'www.google.com')
39 self.assertEquals(port, 443)
40 - self.assertEquals(path, 'https://www.google.com:443/service/subservice?name=value&newname=newvalue')
41 + self.assertEquals(path, '/service/subservice?name=value&newname=newvalue')
42
43 def testParseHttpsUrlWithPort(self):
44 as = atom.service.AtomService('code.google.com')
45 @@ -103,50 +103,8 @@
46 self.assertEquals(ssl, True)
47 self.assertEquals(host, 'www.google.com')
48 self.assertEquals(port, 13981)
49 - self.assertEquals(path, 'https://www.google.com:13981/service/subservice?name=value&newname=newvalue')
50 + self.assertEquals(path, '/service/subservice?name=value&newname=newvalue')
51
52 - def testParseUrlWithFullProxyURL(self):
53 - as = atom.service.AtomService('code.google.com')
54 - as.proxy_url = 'https://proxy.example.com:8080'
55 - self.assert_(as.server == 'code.google.com')
56 - self.assert_(as.proxy_url == 'https://proxy.example.com:8080')
57 - (host, port, ssl, path) = as._ProcessUrl(
58 - 'http://www.google.com:13981/service/subservice?name=value&newname=newvalue')
59 - self.assertEquals(ssl, True)
60 - self.assertEquals(host, 'proxy.example.com')
61 - self.assertEquals(port, 8080)
62 - self.assertEquals(path, 'http://www.google.com:13981/service/subservice?name=value&newname=newvalue')
63 -
64 - def testParseUrlWithHostOnlyProxyURL(self):
65 - as = atom.service.AtomService('code.google.com')
66 - as.proxy_url = 'http://proxy.example.com'
67 - self.assert_(as.server == 'code.google.com')
68 - self.assert_(as.proxy_url == 'http://proxy.example.com:80')
69 - (host, port, ssl, path) = as._ProcessUrl(
70 - 'https://www.google.com/service/subservice')
71 - self.assertEquals(ssl, False)
72 - self.assertEquals(host, 'proxy.example.com')
73 - self.assertEquals(port, 80)
74 - self.assertEquals(path, 'https://www.google.com:443/service/subservice')
75 -
76 - def testSetProxyUrlToIllegalValues(self):
77 - as = atom.service.AtomService('code.google.com')
78 - try:
79 - as.proxy_url = 'proxy.example.com'
80 - self.fail('A URL with no protocol should trigger InvalidProxyUrl')
81 - except atom.service.InvalidProxyUrl:
82 - pass
83 - try:
84 - as.proxy_url = 'http://:80'
85 - self.fail('A URL with no server should trigger InvalidProxyUrl')
86 - except atom.service.InvalidProxyUrl:
87 - pass
88 - try:
89 - as.proxy_url = 'http://'
90 - self.fail('A URL with only the protocol should trigger InvalidProxyUrl')
91 - except atom.service.InvalidProxyUrl:
92 - pass
93 -
94 def testSetBasicAuth(self):
95 client = atom.service.AtomService()
96 client.UseBasicAuth('foo', 'bar')
97
98
99
100 --
101 gentoo-commits@l.g.o mailing list