Esempio n. 1
0
 def test_server_object_construction(self):
     w = setup_warning_catcher()
     warnings.simplefilter("always")
     cb = Server(self.host + ':' + self.port, self.username, self.password)
     self.assertIsInstance(cb.servers, types.ListType)
     self.assertTrue(len(w) == 1)
     self.assertTrue("deprecated" in str(w[-1].message))
Esempio n. 2
0
 def test_vbucketawarecouchbaseclient_object_construction(self):
     w = setup_warning_catcher()
     warnings.simplefilter("always")
     cb = VBucketAwareCouchbaseClient("http://" + self.host + ':'
                                      + self.port + "/pools/default",
                                      self.bucket_name, "")
     self.assertIsInstance(cb.servers, types.ListType)
     self.assertTrue(len(w) == 1)
     self.assertTrue("deprecated" in str(w[-1].message))