Beispiel #1
0
 def testInit(self):
   """Test __init__()."""
   self.mox.StubOutWithMock(client.HttpsAuthClient, '_LoadRootCertChain')
   client.HttpsAuthClient._LoadRootCertChain().AndReturn(None)
   self.mox.ReplayAll()
   c = client.HttpsAuthClient(self.hostname)
   self.assertEqual(c._auth1, None)
   self.assertEqual(c._cookie_token, None)
   self.mox.VerifyAll()
Beispiel #2
0
    def setUp(self):
        super(HttpsAuthClientTest, self).setUp()
        self.stubs = stubout.StubOutForTesting()
        self.hostname = 'hostname'
        self.port = None
        self.client = client.HttpsAuthClient(self.hostname)

        self.fs = fake_filesystem.FakeFilesystem()
        fake_os = fake_filesystem.FakeOsModule(self.fs)
        self.fake_open = fake_filesystem.FakeFileOpen(self.fs)
        self.stubs.Set(client, 'os', fake_os)
Beispiel #3
0
 def testInit(self, _):
     """Test __init__()."""
     c = client.HttpsAuthClient(self.hostname)
     self.assertEqual(c._auth1, None)
     self.assertEqual(c._cookie_token, None)
Beispiel #4
0
 def setUp(self):
   mox.MoxTestBase.setUp(self)
   self.stubs = stubout.StubOutForTesting()
   self.hostname = 'hostname'
   self.port = None
   self.client = client.HttpsAuthClient(self.hostname)