def setUp(self): # Non-featured organizers self.non_featured = OrganizerFactory.create_batch(2) # Featured organizers self.featured = OrganizerFactory.create_batch(2, feature=True) # URL self.url = reverse('organizers:featured')
def setUp(self): # Users self.student, self.another_student = StudentFactory.create_batch(2) self.organizer, self.another_organizer = OrganizerFactory.create_batch( 2) # API Clients self.student_client = self.get_client(user=self.student.user) self.organizer_client = self.get_client(user=self.organizer.user) self.another_student_client = self.get_client( user=self.another_student.user) self.another_organizer_client = self.get_client( user=self.another_organizer.user)
def create_organizers(self): self.stdout.write('Creando organizers') organizers = OrganizerFactory.create_batch(self.get_quantity()) for o in organizers: Balance.objects.create(organizer=o) return organizers