1from Foundation import * 2from PyObjCTools.TestSupport import * 3 4class TestNSURLProtectionSpace (TestCase): 5 def testConstants(self): 6 self.failUnlessIsInstance(NSURLProtectionSpaceHTTPProxy, unicode) 7 self.failUnlessIsInstance(NSURLProtectionSpaceHTTPSProxy, unicode) 8 self.failUnlessIsInstance(NSURLProtectionSpaceFTPProxy, unicode) 9 self.failUnlessIsInstance(NSURLProtectionSpaceSOCKSProxy, unicode) 10 self.failUnlessIsInstance(NSURLAuthenticationMethodDefault, unicode) 11 self.failUnlessIsInstance(NSURLAuthenticationMethodHTTPBasic, unicode) 12 self.failUnlessIsInstance(NSURLAuthenticationMethodHTTPDigest, unicode) 13 self.failUnlessIsInstance(NSURLAuthenticationMethodHTMLForm, unicode) 14 15 def testMethods(self): 16 self.failUnlessResultIsBOOL(NSURLProtectionSpace.receivesCredentialSecurely) 17 self.failUnlessResultIsBOOL(NSURLProtectionSpace.isProxy) 18 19if __name__ == "__main__": 20 main() 21