Exemplo n.º 1
0
    def test_get_default_called_without_defined_datastore_name(
            self, mock_workspace, monkeypatch):
        datastore_class = MagicMock()
        monkeypatch.setattr(
            "prefect.tasks.azureml.datastore.azureml.core.datastore.Datastore",
            datastore_class,
        )

        task = DatastoreGet(workspace=mock_workspace)

        task.run()

        assert datastore_class.get_default
Exemplo n.º 2
0
    def test_initialization(self, mock_workspace):
        task = DatastoreGet(workspace=mock_workspace)

        assert task.workspace == mock_workspace