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='******')
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)
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} )
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' }
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() ]
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() ]
def setUp(self): add_groups_and_permissions() ContributorFactory.create_batch(5)
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)
def setUp(self): add_groups_and_permissions() self.target = reverse('commentaries:prefill_using_DOI') self.physrev_doi = '10.1103/PhysRevB.92.214427'
def setUp(self): add_groups_and_permissions() CommentaryFactory(requested_by=ContributorFactory()) self.view_url = reverse('commentaries:browse', kwargs={ 'nrweeksback': '1' })
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})
def setUp(self): add_groups_and_permissions() self.client = Client() self.target = reverse('theses:request_thesislink')
def setUp(self): add_groups_and_permissions()
def setUp(self): add_groups_and_permissions() self.client = Client() self.target = reverse('theses:theses')