Skip to content
Snippets Groups Projects
Commit 9018de6a authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixes to processing test after removing minio.

parent 587c03ff
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ class SingleTask(Proc): ...@@ -36,7 +36,7 @@ class SingleTask(Proc):
pass pass
def test_tasks(mongomock): def test_tasks(mockmongo):
p = Tasks.create() p = Tasks.create()
assert p.tasks == ['a', 'b'] assert p.tasks == ['a', 'b']
assert_proc(p, None, PENDING) assert_proc(p, None, PENDING)
......
...@@ -21,8 +21,11 @@ reading from the redis result backend, even though all task apperently ended suc ...@@ -21,8 +21,11 @@ reading from the redis result backend, even though all task apperently ended suc
from typing import Generator from typing import Generator
import pytest import pytest
from datetime import datetime from datetime import datetime
import shutil
import os.path
from nomad import config, files from nomad import config
from nomad.files import UploadFile
from nomad.processing import Upload, Calc from nomad.processing import Upload, Calc
from nomad.processing.base import task as task_decorator from nomad.processing.base import task as task_decorator
from nomad.user import me from nomad.user import me
...@@ -44,8 +47,9 @@ def mocksearch_forall(mocksearch): ...@@ -44,8 +47,9 @@ def mocksearch_forall(mocksearch):
@pytest.fixture(scope='function', params=example_files) @pytest.fixture(scope='function', params=example_files)
def uploaded_id(request, clear_files) -> Generator[str, None, None]: def uploaded_id(request, clear_files) -> Generator[str, None, None]:
example_file = request.param example_file = request.param
example_upload_id = example_file.replace('.zip', '') example_upload_id = os.path.basename(example_file).replace('.zip', '')
files._client.fput_object(config.files.uploads_bucket, example_upload_id, example_file) upload_file = UploadFile(example_upload_id).os_path
shutil.copyfile(example_file, upload_file)
yield example_upload_id yield example_upload_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment