Rev 1321: Fix tests. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4

Jelmer Vernooij jelmer at samba.org
Mon Jun 23 16:40:19 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/0.4

------------------------------------------------------------
revno: 1321
revision-id: jelmer at samba.org-20080623154018-gjpb8ytgkrqzrhfu
parent: jelmer at samba.org-20080623154007-5b90xs677xrefy2w
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-06-23 17:40:18 +0200
message:
  Fix tests.
modified:
  tests/test_ra.py               test_ra.py-20080313141743-uzsm7ejitrlqone5-1
=== modified file 'tests/test_ra.py'
--- a/tests/test_ra.py	2008-06-23 14:26:01 +0000
+++ b/tests/test_ra.py	2008-06-23 15:40:18 +0000
@@ -147,31 +147,31 @@
         self.assertRaises(core.SubversionException, auth.credentials, "svn.simple", "MyRealm")
 
     def test_simple(self):
-        auth = ra.Auth([ra.get_simple_prompt_provider(lambda realm, uname, may_save: ('foo', "geheim", 0), 0)])
+        auth = ra.Auth([ra.get_simple_prompt_provider(lambda realm, uname, may_save: ("foo", "geheim", False), 0)])
         creds = auth.credentials("svn.simple", "MyRealm")
         self.assertEquals(("foo", "geheim", 0), creds.next())
         self.assertRaises(StopIteration, creds.next)
 
     def test_username(self):
-        auth = ra.Auth([ra.get_username_prompt_provider(lambda realm, may_save: ("somebody", 0), 0)])
+        auth = ra.Auth([ra.get_username_prompt_provider(lambda realm, may_save: ("somebody", False), 0)])
         creds = auth.credentials("svn.username", "MyRealm")
         self.assertEquals(("somebody", 0), creds.next())
         self.assertRaises(StopIteration, creds.next)
 
     def test_client_cert(self):
-        auth = ra.Auth([ra.get_ssl_client_cert_prompt_provider(lambda realm, may_save: ("filename", 0), 0)])
+        auth = ra.Auth([ra.get_ssl_client_cert_prompt_provider(lambda realm, may_save: ("filename", False), 0)])
         creds = auth.credentials("svn.ssl.client-cert", "MyRealm")
-        self.assertEquals(("filename", 0), creds.next())
+        self.assertEquals(("filename", False), creds.next())
         self.assertRaises(StopIteration, creds.next)
 
     def test_client_cert_pw(self):
-        auth = ra.Auth([ra.get_ssl_client_cert_pw_prompt_provider(lambda realm, may_save: ("supergeheim", 0), 0)])
+        auth = ra.Auth([ra.get_ssl_client_cert_pw_prompt_provider(lambda realm, may_save: ("supergeheim", False), 0)])
         creds = auth.credentials("svn.ssl.client-passphrase", "MyRealm")
-        self.assertEquals(("supergeheim", 0), creds.next())
+        self.assertEquals(("supergeheim", False), creds.next())
         self.assertRaises(StopIteration, creds.next)
 
     def test_server_trust(self):
-        auth = ra.Auth([ra.get_ssl_server_trust_prompt_provider(lambda realm, failures, certinfo, may_save: (42, 0))])
+        auth = ra.Auth([ra.get_ssl_server_trust_prompt_provider(lambda realm, failures, certinfo, may_save: (42, False))])
         auth.set_parameter("svn:auth:ssl:failures", 23)
         creds = auth.credentials("svn.ssl.server", "MyRealm")
         self.assertEquals((42, 0), creds.next())
@@ -181,7 +181,7 @@
         self.i = 0
         def inc_foo(realm, may_save):
             self.i += 1
-            return ("somebody%d" % self.i, 0)
+            return ("somebody%d" % self.i, False)
         auth = ra.Auth([ra.get_username_prompt_provider(inc_foo, 2)])
         creds = auth.credentials("svn.username", "MyRealm")
         self.assertEquals(("somebody1", 0), creds.next())




More information about the bazaar-commits mailing list