コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
    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)
コード例 #4
0
    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)