def setUp(self): self.c = Client() self.competition = PreAddedCompetitionOfSize(entries__num_of_entries=8) self.org = self.competition.organisation self.manager = ManagerFactory(organisation=self.org).user self.dt = DTFactory(organisation=self.org).user self.applicant = OrgMemberFactory(organisation=self.org).user org = OrganisationFactory() self.wrong_org_manager = ManagerFactory(organisation=org).user
def setUp(self): self.c = Client() self.competition = PreAddedCompetitionOfSize(entries__num_of_entries=8) self.stage = self.competition.stage_set.create(state=Stage.STARTED, type=Stage.DE, number=1) self.de_stage = self.stage.destage_set.first() self.de_stage.start() self.table_head = self.de_stage.detable_set.first() self.manager = ManagerFactory( organisation=self.competition.organisation).user org = OrganisationFactory() self.wrong_org_manager = ManagerFactory(organisation=org).user self.target = reverse('main/de_table_endpoint', kwargs={'table_id': self.table_head.id})
def setUp(self): self.c = Client() self.organisation = OrganisationFactory() # type: Organisation self.manager = ManagerFactory(organisation=self.organisation).user self.target = reverse('main/organisation_endpoint', kwargs={'org_id': self.organisation.id})
def test_organisation_show(self): organisation = OrganisationFactory() # type: Organisation manager = ManagerFactory(organisation=organisation).user target = reverse('ui/organisation/show', args=[organisation.slug]) self.three_perm_check(target, manager, 302, 200, 200)
def test_organisation_list_many(self): organisation = OrganisationFactory.create_batch( 5) # type: Organisation manager = ManagerFactory(organisation=organisation[0]).user target = reverse('ui/organisation/list') self.three_perm_check(target, manager, 200, 200, 200)
def test_organisation_list_one(self): organisation = OrganisationFactory() # type: Organisation manager = ManagerFactory(organisation=organisation).user target = reverse('ui/organisation/list') self.three_perm_check(target, manager, 200, 200, 200)
def setUp(self): self.organisation = OrganisationFactory() # type: OrganisationFactory self.manager = ManagerFactory(organisation=self.organisation).user