def test_single_ssl_ca_cert_in_list(self): up2date_cfg = {} expected = '/var/foo/bar' up2date_cfg['sslCACert'] = [expected] res = rhnplugin.get_ssl_ca_cert(up2date_cfg) self.assertEquals(str, type(res)) self.assertEquals(expected, res)
def test_multiple_ssl_ca_cert_in_list(self): # For now we just use the first one up2date_cfg = {} expected = '/var/foo/bar' not_expected = '/var/blech/foo/bar' up2date_cfg['sslCACert'] = [expected, not_expected] res = rhnplugin.get_ssl_ca_cert(up2date_cfg) self.assertEquals(str, type(res)) self.assertEquals(expected, res)