310fd86c21f2ce0000d8023b95385d895c0f01bd,tests/core/tests.py,,create_photo,#,36
Before Change
img = generate_lenna()
file = ContentFile(img.read())
photo.original_image = file
photo.original_image.save(name, file)
photo.save()
img.close()
return photo
After Change
def create_photo(name):
return create_instance(Photo, name)
class Photo(models.Model):
original_image = models.ImageField(upload_to="photos")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: matthewwithanm/django-imagekit
Commit Name: 310fd86c21f2ce0000d8023b95385d895c0f01bd
Time: 2012-02-17
Author: matthew@exanimo.com
File Name: tests/core/tests.py
Class Name:
Method Name: create_photo
Project Name: havakv/pycox
Commit Name: b97635a12f49f8e1eaebcee30245ccb4e13a95c9
Time: 2018-05-05
Author: havard@DN0a22c81b.SUNet
File Name: pycox/torch_fitter.py
Class Name: FitNet
Method Name: save_model_weights
Project Name: havakv/pycox
Commit Name: b97635a12f49f8e1eaebcee30245ccb4e13a95c9
Time: 2018-05-05
Author: havard@DN0a22c81b.SUNet
File Name: pycox/cox.py
Class Name: CoxBase
Method Name: save_model_weights