コード例 #1
0
    def test_delete(self):
        barbican = resources.BarbicanSecrets()
        barbican._manager = mock.MagicMock()
        barbican.raw_resource = mock.MagicMock(uuid="fake_uuid")

        barbican.delete()
        barbican._manager.assert_called_once_with()
コード例 #2
0
 def test_is_deleted(self):
     barbican = resources.BarbicanSecrets()
     barbican._manager = mock.MagicMock()
     barbican.raw_resource = mock.MagicMock(uuid="fake_uuid")
     self.assertFalse(barbican.is_deleted())
コード例 #3
0
    def test_list(self):
        barbican = resources.BarbicanSecrets()
        barbican._manager = mock.MagicMock()

        barbican.list()
        barbican._manager.assert_called_once_with()
コード例 #4
0
 def test_id(self):
     barbican = resources.BarbicanSecrets()
     barbican.raw_resource = mock.MagicMock(secret_ref="fake_uuid")
     self.assertEqual("fake_uuid", barbican.id())