def test_keystone_ca_cert_b64(self, _isfile): _isfile.return_value = True with patch_open() as (_open, _file): nutils.keystone_ca_cert_b64() self.assertTrue(self.b64encode.called)
def test_keystone_ca_cert_b64_no_cert_file(self, _isfile): _isfile.return_value = False cert = nutils.keystone_ca_cert_b64() self.assertEquals(cert, None)