4f8a3739ec24cd07cad430bc5bfaaf095c6b3582,app/tests/cases_tests/test_forms.py,,test_upload_some_images,#Any#Any#Any#,16
Before Change
response = client.post("/cases/uploads/", data={"files": f"{file1.uuid}"})
assert response.status_code == 302
redirect_match = re.search(
r"/cases/uploads/(?P<uuid>[^/]+)/?$", response["Location"]
)
assert redirect_match is not None
assert RawImageUploadSession.objects.filter(
pk=UUID(redirect_match.group("uuid"))
After Change
)
assert response.status_code == 302
assert rs.images.count() == 1
sessions = RawImageUploadSession.objects.all()
assert len(sessions) == 1
response = get_view_for_user(
url=sessions[0].get_absolute_url(), client=client, user=user
)
assert response.status_code == 200
response = get_view_for_user(
url=sessions[0].get_absolute_url(),
client=client,
user=UserFactory(is_staff=True),
)
assert response.status_code == 403
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: comic/grand-challenge.org
Commit Name: 4f8a3739ec24cd07cad430bc5bfaaf095c6b3582
Time: 2020-01-17
Author: code@jmsmkn.com
File Name: app/tests/cases_tests/test_forms.py
Class Name:
Method Name: test_upload_some_images
Project Name: EducationalTestingService/skll
Commit Name: cf26ab001151638caa67ad8580f8d7f13e0490ac
Time: 2014-11-13
Author: nmadnani@ets.org
File Name: tests/test_preprocessing.py
Class Name:
Method Name: test_class_map_feature_hasher
Project Name: EducationalTestingService/skll
Commit Name: cf26ab001151638caa67ad8580f8d7f13e0490ac
Time: 2014-11-13
Author: nmadnani@ets.org
File Name: tests/test_preprocessing.py
Class Name:
Method Name: test_class_map