3c53d87a9515c81df25b818e577d7dce66f18f90,django/comicsite/tests.py,ViewsTest,_signup_user,#ViewsTest#Any#,152

Before Change


        
        
        form = signup_user(data)
        self.assertTrue(form.is_valid(), "could not create user 1. reason: %s"
                        % form.errors)
        query_result = User.objects.filter(username=form.data["username"])        
        return query_result[0] 
        

After Change


        data.update(overwrite_data) //overwrite any key in default if in data
        
        
        signin_page = self.client.post(reverse("userena.views.signup"),data)
                
        // check whether signin succeeded. If succeeded the response will be a
        // httpResponseRedirect object, which has a "Location" key in its
        // items(). Don"t know how to better check for type here.
        list = [x[0] for x in signin_page.items()]
        
        self.assertTrue("Location" in list, "could not create user. dumping"
                        " page:\n %s"
                        % signin_page.content)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: comic/grand-challenge.org
Commit Name: 3c53d87a9515c81df25b818e577d7dce66f18f90
Time: 2013-07-08
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: ViewsTest
Method Name: _signup_user


Project Name: chakki-works/doccano
Commit Name: 655e3f55a5c24e11941f17942b3fa108c81fb603
Time: 2019-01-23
Author: light.tree.1.13@gmail.com
File Name: app/server/tests/test_annotation_api.py
Class Name: TestAnnotationAPI
Method Name: test_delete_annotation


Project Name: comic/grand-challenge.org
Commit Name: 6499769919b50f645fd3d76623225eacf0cd141d
Time: 2013-07-08
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: ViewsTest
Method Name: _signup_user