01c0fa5f2a622efe329653c40c2e9a95972e11f3,django/comicsite/tests.py,ProjectLoginTest,setUp,#ProjectLoginTest#,979
Before Change
// 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("projectadmin_")
// The project created by projectadmin
self.testproject = self.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("participant_")
self._register(self.participant,self.testproject)
self.participant2 = self._create_random_user("participant2_")
self._register(self.participant2,self.testproject)
// user which has only registered at comicframework but has not
// registered for any project
self.signedup_user = self._create_random_user("signedup_user_")
def test_project_login(self):
// see if login for specific project works. This tests the project
After Change
def setUp(self ):
Create some objects to work with, In part this is done through
admin views, meaning admin views are also tested here.
[self.testproject,
self.root,
self.projectadmin,
self.participant,
self.signedup_user] = self._create_dummy_project("testproject")
self.participant2 = self._create_random_user("participant2_")
self._register(self.participant2,self.testproject)
In pattern: SUPERPATTERN
Frequency: 8
Non-data size: 39
Instances Project Name: comic/grand-challenge.org
Commit Name: 01c0fa5f2a622efe329653c40c2e9a95972e11f3
Time: 2013-10-10
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: ProjectLoginTest
Method Name: setUp
Project Name: comic/grand-challenge.org
Commit Name: 01c0fa5f2a622efe329653c40c2e9a95972e11f3
Time: 2013-10-10
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: e69f7120fde18e54e2c579f2fe757ef479c8ea00
Time: 2013-10-10
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: e69f7120fde18e54e2c579f2fe757ef479c8ea00
Time: 2013-10-10
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: ProjectLoginTest
Method Name: setUp
Project Name: comic/grand-challenge.org
Commit Name: e69f7120fde18e54e2c579f2fe757ef479c8ea00
Time: 2013-10-10
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: TemplateTagsTest
Method Name: setUp
Project Name: comic/grand-challenge.org
Commit Name: 01c0fa5f2a622efe329653c40c2e9a95972e11f3
Time: 2013-10-10
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: ProjectLoginTest
Method Name: setUp
Project Name: comic/grand-challenge.org
Commit Name: 01c0fa5f2a622efe329653c40c2e9a95972e11f3
Time: 2013-10-10
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: e69f7120fde18e54e2c579f2fe757ef479c8ea00
Time: 2013-10-10
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: 01c0fa5f2a622efe329653c40c2e9a95972e11f3
Time: 2013-10-10
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: TemplateTagsTest
Method Name: setUp