33dd02d5687169d42cc0d46a7207cb0db7787ca2,src/imagekit/tests.py,PLTest,setUp,#PLTest#,35

Before Change


        imgfile = StringIO.StringIO()
        Image.new("RGB", (100, 100)).save(imgfile, "JPEG")
        
        content_file = ContentFile(imgfile.read())
        
        self.p = TestPhoto(name="landscape")
        self.p.image.save("image.jpeg", content_file)

After Change


    def setUp(self):
        Image.new("RGB", (100, 100)).save(IMG_PATH, "JPEG")
        self.p = TestPhoto(name="landscape")
        self.p.image.save(os.path.basename(IMG_PATH),
                           ContentFile(open(IMG_PATH, "rb").read()))
        self.p.save()
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: matthewwithanm/django-imagekit
Commit Name: 33dd02d5687169d42cc0d46a7207cb0db7787ca2
Time: 2009-01-04
Author: justin.driscoll@gmail.com
File Name: src/imagekit/tests.py
Class Name: PLTest
Method Name: setUp


Project Name: cve-search/cve-search
Commit Name: 8355f501c96016e14f268e26a2f034ee43b2f984
Time: 2015-01-07
Author: pieterjan.moreels@gmail.com
File Name: db_whitelist.py
Class Name:
Method Name:


Project Name: uuazed/numerapi
Commit Name: 80e4f15860b6b002f2dd3f420eaeff63e202eb2f
Time: 2017-11-18
Author: wolfgang@steitz.me
File Name: numerapi/numerapi.py
Class Name: NumerAPI
Method Name: upload_predictions


Project Name: cve-search/cve-search
Commit Name: 8355f501c96016e14f268e26a2f034ee43b2f984
Time: 2015-01-07
Author: pieterjan.moreels@gmail.com
File Name: db_blacklist.py
Class Name:
Method Name: