def test_timeslot_booking_not_owned(self):
     """Test``TimeSlot`` booking on not owned ``Submissions``"""
     create_user('alex')
     self.client.login(username='******', password='******')
     response = self.client.get(self.booking_url)
     self.assertEqual(response.status_code, 405)
     response = self.client.post(self.booking_url, {})
     self.assertEqual(response.status_code, 404)
Example #2
0
 def test_timeslot_booking_not_owned(self):
     """Test``TimeSlot`` booking on not owned ``Submissions``"""
     create_user('alex')
     self.client.login(username='******', password='******')
     response = self.client.get(self.booking_url)
     self.assertEqual(response.status_code, 405)
     response = self.client.post(self.booking_url, {})
     self.assertEqual(response.status_code, 404)
Example #3
0
 def generate_submissions(self, total, phase, user=None, are_winners=True):
     """Generates a nubmer of submissions"""
     for i in range(total):
         user = user if user else create_user('u%s' % i),
         yield create_submission(title='Submission %s' % i,
                                 created_by=user, phase=phase,
                                 is_winner=are_winners)
Example #4
0
 def setUp(self):
     self.initial_data = setup_ideation_phase(**setup_ignite_challenge())
     self.profile = create_user('bob')
     self.submission = create_submission(created_by=self.profile,
                                         phase=self.initial_data['ideation_phase'])
     self.parent = self.submission.parent
     self.submission_path = self.submission.get_absolute_url()
Example #5
0
 def setUp(self):
     self.initial_data = setup_ideation_phase(**setup_ignite_challenge())
     self.profile = create_user('bob')
     self.submission = create_submission(
         created_by=self.profile, phase=self.initial_data['ideation_phase'])
     self.parent = self.submission.parent
     self.submission_path = self.submission.get_absolute_url()
Example #6
0
 def setUp(self):
     self.initial_data = setup_development_rounds_phase(**setup_ignite_challenge())
     self.ideation = self.initial_data['ideation_phase']
     self.development = self.initial_data['dev_phase']
     self.user = create_user('bob')
     self.round_a = self.initial_data['round_a']
     self.round_b = self.initial_data['round_b']
 def setUp(self):
     self.initial_data = setup_development_rounds_phase(
         **setup_ignite_challenge())
     self.ideation = self.initial_data['ideation_phase']
     self.development = self.initial_data['dev_phase']
     self.user = create_user('bob')
     self.round_a = self.initial_data['round_a']
     self.round_b = self.initial_data['round_b']
 def generate_submissions(self, total, phase, user=None, are_winners=True):
     """Generates a nubmer of submissions"""
     for i in range(total):
         user = user if user else create_user('u%s' % i)
         yield create_submission(title='Submission %s' % i,
                                 created_by=user,
                                 phase=phase,
                                 is_winner=are_winners)
 def setUp(self):
     super(SubmissionEditIdeationOpenNotOwnerTest, self).setUp()
     initial_data = setup_ideation_phase(**setup_ignite_challenge())
     other = create_user('other')
     submission = create_submission(created_by=other,
                                    phase=initial_data['ideation_phase'])
     self.edit_url = reverse('entry_edit',
                             args=['ideas', submission.parent.slug])
     self.client.login(username='******', password='******')
 def setUp(self):
     super(SubmissionEditIdeationOpenNotOwnerTest, self).setUp()
     initial_data = setup_ideation_phase(**setup_ignite_challenge())
     other = create_user('other')
     submission = create_submission(created_by=other,
                                    phase=initial_data['ideation_phase'])
     self.edit_url = reverse('entry_edit',
                             args=['ideas', submission.parent.slug])
     self.client.login(username='******', password='******')
 def setUp(self):
     super(SubmissionEditDevelopmentOpenNotOwnerTest, self).setUp()
     initial_data = setup_development_rounds_phase(**setup_ignite_challenge())
     other = create_user('other')
     submission = create_submission(created_by=other,
                                    phase=initial_data['dev_phase'],
                                    phase_round=initial_data['round_b'])
     self.edit_url = reverse('entry_edit',
                             args=['apps', submission.parent.slug])
     self.client.login(username='******', password='******')
 def setUp(self):
     super(SubmissionEditDevelopmentClosedRoundNotOnwerTests, self).setUp()
     initial_data = setup_development_phase(is_round_open=False,
                                            **setup_ignite_challenge())
     other = create_user('other')
     submission = create_submission(created_by=other,
                                    phase=initial_data['dev_phase'],
                                    phase_round=initial_data['round_a'])
     self.edit_url = reverse('entry_edit',
                             args=['apps', submission.parent.slug])
     self.client.login(username='******', password='******')
Example #13
0
 def setUp(self):
     self.initial_data = setup_ideation_phase(**setup_ignite_challenge())
     self.profile = create_user('bob')
     self.submission = create_submission(created_by=self.profile,
                                         phase=self.initial_data['ideation_phase'])
     self.view_path = self.submission.get_absolute_url()
     self.edit_path = self.submission.get_edit_url()
     ExternalLink.objects.create(submission=self.submission, name='Foo',
                                 url='http://example.com/')
     ExternalLink.objects.create(submission=self.submission, name='Foo',
                                 url='http://example.net/')
     self.client.login(username='******', password='******')
Example #14
0
 def setUp(self):
     self.initial_data = setup_ideation_phase(**setup_ignite_challenge())
     self.profile = create_user('bob')
     self.submission = create_submission(
         created_by=self.profile, phase=self.initial_data['ideation_phase'])
     self.view_path = self.submission.get_absolute_url()
     self.edit_path = self.submission.get_edit_url()
     ExternalLink.objects.create(submission=self.submission,
                                 name='Foo',
                                 url='http://example.com/')
     ExternalLink.objects.create(submission=self.submission,
                                 name='Foo',
                                 url='http://example.net/')
     self.client.login(username='******', password='******')
Example #15
0
 def setUp(self):
     self.profile = create_user('bob')
     self.url = reverse('create_entry', args=['ideas'])
     self.initial_data = setup_development_phase(**setup_ignite_challenge())
     self.ideation = self.initial_data['ideation_phase']
     self.development = self.initial_data['dev_phase']
     self.submission_kwargs = {
         'created_by': self.profile,
         'phase': self.ideation,
         'is_winner': True
         }
     self.submission_a = create_submission(title='ping',
                                           **self.submission_kwargs)
     self.submission_b = create_submission(title='pong',
                                           **self.submission_kwargs)
     self.search_url = reverse('search:search')
Example #16
0
 def setUp(self):
     self.profile = create_user('bob')
     self.url = reverse('create_entry', args=['ideas'])
     self.initial_data = setup_development_phase(**setup_ignite_challenge())
     self.ideation = self.initial_data['ideation_phase']
     self.development = self.initial_data['dev_phase']
     self.submission_kwargs = {
         'created_by': self.profile,
         'phase': self.ideation,
         'is_winner': True
     }
     self.submission_a = create_submission(title='ping',
                                           **self.submission_kwargs)
     self.submission_b = create_submission(title='pong',
                                           **self.submission_kwargs)
     self.search_url = reverse('search:search')
 def setUp(self):
     self.profile = create_user('bob')
     self.url = reverse('create_entry', args=['ideas'])
 def test_timeslot_listing_not_owned(self):
     """Test ``TimeSlot`` listing on not owned green-lit ``Submissions``"""
     create_user('alex')
     self.client.login(username='******', password='******')
     response = self.client.get(self.listing_url)
     self.assertEqual(response.status_code, 404)
Example #19
0
 def setUp(self):
     self.judge = create_judge('bob')
     self.user = create_user('alex')
Example #20
0
 def test_timeslot_listing_not_owned(self):
     """Test ``TimeSlot`` listing on not owned green-lit ``Submissions``"""
     create_user('alex')
     self.client.login(username='******', password='******')
     response = self.client.get(self.listing_url)
     self.assertEqual(response.status_code, 404)
 def setUp(self):
     self.profile = create_user('bob')
     self.ideation_url = reverse('create_entry', args=['ideas'])
     self.development_url = reverse('create_entry', args=['apps'])
 def setUp(self):
     self.profile = create_user('bob')
     self.ideation_url = reverse('create_entry', args=['ideas'])
     self.development_url = reverse('create_entry', args=['apps'])
Example #23
0
 def setUp(self):
     self.judge = create_judge('bob')
     self.user = create_user('alex')
Example #24
0
 def setUp(self):
     self.profile = create_user('bob')
     self.url = reverse('create_entry', args=['ideas'])