c610126cc645933cc24fd4f6548ed953caa6d857,app/tests/cases_tests/test_background_tasks.py,,test_staged_uploaded_file_cleanup_interferes_with_image_build,#,86
Before Change
session, uploaded_images = create_raw_upload_image_session(images)
StagedAjaxFile(uploaded_images["image10x10x10.zraw"].staged_file_id).delete()
session.session_state = UPLOAD_SESSION_STATE.queued
session.save()
build_images(session.pk)
session.refresh_from_db()
assert session.session_state == UPLOAD_SESSION_STATE.stopped
assert session.error_message is not None
After Change
@pytest.mark.django_db
def test_staged_uploaded_file_cleanup_interferes_with_image_build():
task_collector = CeleryTaskCollector(signals.build_images)
with replace_var(signals, "build_images", task_collector):
images = [
"image10x10x10.zraw",
"image10x10x10.mhd",
]
session, uploaded_images = create_raw_upload_image_session(images)
StagedAjaxFile(uploaded_images["image10x10x10.zraw"].staged_file_id).delete()
task_collector.execute_calls()
session.refresh_from_db()
assert session.session_state == UPLOAD_SESSION_STATE.stopped
assert session.error_message is not None
@pytest.mark.django_db
def test_no_convertible_file():
task_collector = CeleryTaskCollector(signals.build_images)
with replace_var(signals, "build_images", task_collector):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 15
Instances
Project Name: comic/grand-challenge.org
Commit Name: c610126cc645933cc24fd4f6548ed953caa6d857
Time: 2018-06-27
Author: pkcakeout@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: c610126cc645933cc24fd4f6548ed953caa6d857
Time: 2018-06-27
Author: pkcakeout@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: c610126cc645933cc24fd4f6548ed953caa6d857
Time: 2018-06-27
Author: pkcakeout@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: c610126cc645933cc24fd4f6548ed953caa6d857
Time: 2018-06-27
Author: pkcakeout@gmail.com
File Name: app/tests/cases_tests/test_background_tasks.py
Class Name:
Method Name: test_mhd_file_creation