Beispiel #1
0
    def test_delete(self):
        clients = mock.MagicMock()
        resource = mock.Mock()
        resource.name = "TEST_NAME"

        mistral = resources.MistralWorkbooks(user=clients, resource=resource)

        mistral.delete()

        clients.mistral().workbooks.delete.assert_called_once_with("TEST_NAME")
Beispiel #2
0
    def test_delete(self):
        mistral = resources.MistralWorkbooks()
        mistral._service = "mistral"
        mistral.user = mock.MagicMock()
        mistral._resource = "some_resources"
        mistral.raw_resource = {"name": "TEST_NAME"}
        mistral.user.mistral().some_resources.delete.return_value = None

        mistral.delete()
        mistral.user.mistral().some_resources.delete.assert_called_once_with(
            "TEST_NAME")