summaryrefslogtreecommitdiff
path: root/net/py-google/patches/patch-ab
blob: 4272613afd074decaeb2b3a39b6f25e6864dd46c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
$NetBSD: patch-ab,v 1.2 2003/08/11 22:08:34 recht Exp $

--- googletest.py.orig	2002-04-18 22:11:18.000000000 +0200
+++ googletest.py	2003-05-31 12:23:19.000000000 +0200
@@ -6,7 +6,9 @@
 __copyright__ = "Copyright (c) 2002 Mark Pilgrim"
 __license__ = "Python"
 
-import google, SOAP
+import google
+from SOAPpy import SOAPProxy
+from SOAPpy import Types
 import unittest
 import sys, os
 from StringIO import StringIO
@@ -251,33 +253,33 @@
         self.assertRaises(google.NoLicenseKey, google.doGoogleSearch, q=self.q)
         
     def testPassInvalidKey(self):
-        """passing invalid license key should fail with SOAP.faultType"""
-        self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q, license_key=self.badkey)
+        """passing invalid license key should fail with Types.faultType"""
+        self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q, license_key=self.badkey)
     
     def testSetInvalidKey(self):
-        """setting invalid module-level license key should fail with SOAP.faultType"""
+        """setting invalid module-level license key should fail with Types.faultType"""
         google.setLicense(self.badkey)
-        self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
+        self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
     
     def testEnvInvalidKey(self):
-        """invalid environment variable license key should fail with SOAP.faultType"""
+        """invalid environment variable license key should fail with Types.faultType"""
         os.environ[self.envkey] = self.badkey
-        self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
+        self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
     
     def testHomeDirKey(self):
-        """invalid license key in home directory should fail with SOAP.faultType"""
+        """invalid license key in home directory should fail with Types.faultType"""
         self.createfile(os.environ["HOME"], self.licensefile, self.badkey)
-        self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
+        self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
 
     def testCurDirKey(self):
-        """invalid license key in current directory should fail with SOAP.faultType"""
+        """invalid license key in current directory should fail with Types.faultType"""
         self.createfile("", self.licensefile, self.badkey)
-        self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
+        self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
 
     def testScriptDirKey(self):
-        """invalid license key in script directory should fail with SOAP.faultType"""
+        """invalid license key in script directory should fail with Types.faultType"""
         self.createfile(google._getScriptDir(), self.licensefile, self.badkey)
-        self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
+        self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
 
 if __name__ == "__main__":
     unittest.main()