Exemple #1
0
    def test_idcertlib_gone_exception(self, mock_update):
        mock_update.side_effect = GoneException(410, "bye bye", " 234234")
        actionclient = action_client.ActionClient()
        self.assertRaises(GoneException, actionclient.update)

        # just verify the certlib update worked
        report = actionclient.entcertlib.report
        self.assertTrue(self.stub_ent1.serial in report.valid)
Exemple #2
0
    def test_idcertlib_gone_exception(self, mock_update):
        mock_update.side_effect = GoneException(410, "bye bye", " 234234")
        mgr = certmgr.CertManager(lock=stubs.MockActionLock(),
                                  uep=self.mock_uep)
        self.assertRaises(GoneException, mgr.update)

        # just verify the certlib update worked
        report = self.update_action_syslog_mock.call_args[0][0]
        self.assertTrue(self.stub_ent1.serial in report.valid)
Exemple #3
0
    def test_validate_registration_gone(self, valid, read, get_consumer):
        consumer_id = '1234'
        valid.return_value = True
        read.return_value.getConsumerId.return_value = consumer_id
        get_consumer.side_effect = GoneException(httplib.GONE, '', '')

        # test
        self.plugin.validate_registration()

        # validation
        get_consumer.assert_called_with(consumer_id)
        self.assertFalse(self.plugin.registered)
Exemple #4
0
 def test_gone_exception(self, mock_update):
     mock_update.side_effect = GoneException(410, "bye bye", " 234234")
     actionclient = action_client.ActionClient()
     self.assertRaises(GoneException, actionclient.update)
Exemple #5
0
 def test_gone_exception(self, mock_update):
     mock_update.side_effect = GoneException(410, "bye bye", " 234234")
     mgr = certmgr.CertManager(lock=stubs.MockActionLock(),
                               uep=self.mock_uep)
     self.assertRaises(GoneException, mgr.update)