22c3895c7ede3cbeaee16c15e2ee430c2c6ede42,app/tests/cases_tests/test_background_tasks.py,,test_errors_on_files_with_duplicate_file_names,#,127
Before Change
@pytest.mark.django_db
def test_errors_on_files_with_duplicate_file_names():
task_collector = CeleryTaskCollector(signals.build_images)
with replace_var(signals, "build_images", task_collector):
images = [
"image10x10x10.zraw",
"image10x10x10.mhd",
"image10x10x10.zraw",
"image10x10x10.mhd",
]
session, uploaded_images = create_raw_upload_image_session(images)
uploaded_images = RawImageFile.objects.filter(upload_session=session).all()
assert len(uploaded_images) == 4
task_collector.execute_calls()
session.refresh_from_db()
assert session.session_state == UPLOAD_SESSION_STATE.stopped
assert session.error_message is None
for raw_image in uploaded_images:
raw_image.refresh_from_db()
assert raw_image.error is not None
@pytest.mark.django_db
def test_mhd_file_annotation_creation():
task_collector = CeleryTaskCollector(signals.build_images)
with replace_var(signals, "build_images", task_collector):
After Change
@pytest.mark.django_db
def test_errors_on_files_with_duplicate_file_names(settings):
// Override the celery settings
settings.task_eager_propagates = True,
settings.task_always_eager = True,
settings.broker_url = "memory://",
settings.backend = "memory"
images = [
"image10x10x10.zraw",
"image10x10x10.mhd",
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 17
Instances
Project Name: comic/grand-challenge.org
Commit Name: 22c3895c7ede3cbeaee16c15e2ee430c2c6ede42
Time: 2018-08-15
Author: jamesmeakin@gmail.com
File Name: app/tests/cases_tests/test_background_tasks.py
Class Name:
Method Name: test_errors_on_files_with_duplicate_file_names
Project Name: comic/grand-challenge.org
Commit Name: 22c3895c7ede3cbeaee16c15e2ee430c2c6ede42
Time: 2018-08-15
Author: jamesmeakin@gmail.com
File Name: app/tests/cases_tests/test_background_tasks.py
Class Name:
Method Name: test_no_convertible_file
Project Name: comic/grand-challenge.org
Commit Name: 22c3895c7ede3cbeaee16c15e2ee430c2c6ede42
Time: 2018-08-15
Author: jamesmeakin@gmail.com
File Name: app/tests/cases_tests/test_background_tasks.py
Class Name:
Method Name: test_mhd_file_creation
Project Name: comic/grand-challenge.org
Commit Name: 22c3895c7ede3cbeaee16c15e2ee430c2c6ede42
Time: 2018-08-15
Author: jamesmeakin@gmail.com
File Name: app/tests/cases_tests/test_background_tasks.py
Class Name:
Method Name: test_staged_uploaded_file_cleanup_interferes_with_image_build
Project Name: comic/grand-challenge.org
Commit Name: 22c3895c7ede3cbeaee16c15e2ee430c2c6ede42
Time: 2018-08-15
Author: jamesmeakin@gmail.com
File Name: app/tests/cases_tests/test_background_tasks.py
Class Name:
Method Name: test_mhd_file_annotation_creation
Project Name: comic/grand-challenge.org
Commit Name: 22c3895c7ede3cbeaee16c15e2ee430c2c6ede42
Time: 2018-08-15
Author: jamesmeakin@gmail.com
File Name: app/tests/cases_tests/test_background_tasks.py
Class Name:
Method Name: test_errors_on_files_with_duplicate_file_names