示例#1
0
 def setUp(self):
     add_groups_and_permissions()
     ContributorFactory.create_batch(5)
     self.current_contrib = ContributorFactory.create(
         user__last_name=
         'Linder',  # To pass the author check in create submissions view
         user__username='******',
         user__password='******')
示例#2
0
 def setUp(self):
     add_groups_and_permissions()
     self.contributor = ContributorFactory(user__username='******',
                                           user__password='******')
     self.view_url = reverse('commentaries:request_commentary')
     self.login_url = reverse('scipost:login')
     self.redirected_login_url = '%s?next=%s' % (self.login_url,
                                                 self.view_url)
示例#3
0
 def setUp(self):
     add_groups_and_permissions()
     self.client = Client()
     self.commentary = UnpublishedCommentaryFactory(
         requested_by=ContributorFactory(), vetted_by=ContributorFactory())
     self.target = reverse(
         'commentaries:commentary',
         kwargs={'arxiv_or_DOI_string': self.commentary.arxiv_or_DOI_string}
     )
示例#4
0
 def setUp(self):
     add_groups_and_permissions()
     ContributorFactory.create_batch(5)
     self.commentary = UnvettedCommentaryFactory.create()
     self.user = UserFactory.create()
     self.form_data = {
         'action_option': VetCommentaryForm.ACTION_ACCEPT,
         'refusal_reason': VetCommentaryForm.REFUSAL_EMPTY,
         'email_response_field': 'Lorem Ipsum'
     }
示例#5
0
 def setUp(self):
     add_groups_and_permissions()
     ContributorFactory.create_batch(5)
     factory_instance = UnvettedCommentaryFactory()
     self.user = UserFactory()
     self.valid_form_data = model_form_data(factory_instance,
                                            RequestPublishedArticleForm)
     self.valid_form_data['acad_field'] = factory_instance.acad_field.id
     self.valid_form_data['specialties'] = [
         s.id for s in factory_instance.specialties.all()
     ]
示例#6
0
 def setUp(self):
     add_groups_and_permissions()
     ContributorFactory.create_batch(5)
     # Next line: don't use .build() because the instance must be saved so that
     # factory_instance.specialties.all() below works out.
     factory_instance = UnvettedUnpublishedCommentaryFactory()
     self.user = UserFactory()
     self.valid_form_data = model_form_data(factory_instance,
                                            RequestPublishedArticleForm)
     self.valid_form_data[
         'arxiv_identifier'] = factory_instance.arxiv_identifier
     self.valid_form_data['acad_field'] = factory_instance.acad_field.id
     self.valid_form_data['specialties'] = [
         s.id for s in factory_instance.specialties.all()
     ]
示例#7
0
 def setUp(self):
     add_groups_and_permissions()
     ContributorFactory.create_batch(5)
示例#8
0
 def setUp(self):
     add_groups_and_permissions()
     self.view_url = reverse('commentaries:vet_commentary_requests')
     self.login_url = reverse('scipost:login')
     self.password = '******'
     self.contributor = ContributorFactory(user__password=self.password)
示例#9
0
 def setUp(self):
     add_groups_and_permissions()
     self.target = reverse('commentaries:prefill_using_DOI')
     self.physrev_doi = '10.1103/PhysRevB.92.214427'
示例#10
0
 def setUp(self):
     add_groups_and_permissions()
     CommentaryFactory(requested_by=ContributorFactory())
     self.view_url = reverse('commentaries:browse', kwargs={
         'nrweeksback': '1'
         })
示例#11
0
 def setUp(self):
     add_groups_and_permissions()
     ContributorFactory.create_batch(5)
     self.client = Client()
     self.thesislink = ThesisLinkFactory()
     self.target = reverse('theses:vet_thesislink', kwargs={'pk': self.thesislink.id})
示例#12
0
 def setUp(self):
     add_groups_and_permissions()
     self.client = Client()
     self.target = reverse('theses:request_thesislink')
示例#13
0
 def setUp(self):
     add_groups_and_permissions()
示例#14
0
 def setUp(self):
     add_groups_and_permissions()
     self.client = Client()
     self.target = reverse('theses:theses')