50622f695a1a8a05e4491f5cfb77a92ea29b776f,django/comicsite/tests.py,UploadTest,setUp,#UploadTest#,302

Before Change


        
        // non-root users are created as if they signed up through the site,
        // to maximize test coverage.        
        self.registered_user = self._create_user({"username":"registered_user"})
        
                                        
        self.siteadmin = self._create_user({"username":"siteadmin",
                                            "email":"df@rt.com"}) 
        
        self.testsite = create_comicsite_in_admin(self.siteadmin,"testsite")                
        create_page_in_admin(self.testsite,"testpage1")

After Change


class UploadTest(ComicframeworkTestCase):
    
    
    def setUp(self):
         Create some objects to work with, In part this is done through
        admin views, meaning admin views are also tested here.
        
        // Create four types of users that exist: Root, can do anything, 
        // projectadmin, cam do things to a project he or she owns. Participant can
        // show some restricted content for a project and upload files,
        // signup_user can see some pages but not others.
        
        self.root = User.objects.create_user("root",
                                      "w.s.kerkstra@gmail.com",
                                      "testpassword")        
        self.root.is_staff = True
        self.root.is_superuser = True
        self.root.save()
        
        
        // non-root users are created as if they signed up through the project,
        // to maximize test coverage. 
               
        // Creator of a project.                                        
        self.projectadmin = self._create_random_user()
        
        // The project created by projectadmin 
        self.testproject = create_comicsite_in_admin(self.projectadmin,"testproject")                
        create_page_in_admin(self.testproject,"testpage1")
        
        // user which has pressed the register link for the project, so is 
        // part of testproject_participants group
        self.participant = self._create_random_user()
        self._test_register(self.participant,self.testproject)
        
        // user which has only registered at comicframework but has not 
        // registered for any project
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 12

Instances


Project Name: comic/grand-challenge.org
Commit Name: 50622f695a1a8a05e4491f5cfb77a92ea29b776f
Time: 2013-07-11
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: UploadTest
Method Name: setUp


Project Name: comic/grand-challenge.org
Commit Name: 50622f695a1a8a05e4491f5cfb77a92ea29b776f
Time: 2013-07-11
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: UploadTest
Method Name: setUp


Project Name: comic/grand-challenge.org
Commit Name: 1b04352a65062e0bbe2f36f3adb059e52d7ba496
Time: 2013-07-11
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: UploadTest
Method Name: setUp


Project Name: comic/grand-challenge.org
Commit Name: 1b04352a65062e0bbe2f36f3adb059e52d7ba496
Time: 2013-07-11
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: ViewsTest
Method Name: setUp


Project Name: comic/grand-challenge.org
Commit Name: 50622f695a1a8a05e4491f5cfb77a92ea29b776f
Time: 2013-07-11
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: ViewsTest
Method Name: setUp