def get(self, request, format=None): locations_testing.create_workshops_sections_and_cells() sows_testing.create_statuses() piglets_testing.create_piglets_statuses() staff_testing.create_svinbin_users() sows_testing.create_boars() sows_events_testing.create_types() return Response({'msg': 'success'})
def setUp(self): self.client = APIClient() locations_testing.create_workshops_sections_and_cells() sows_testing.create_statuses() sows_testing.create_boars() sows_events_testing.create_types() piglets_testing.create_piglets_statuses() staff_testing.create_svinbin_users() self.user = staff_testing.create_employee() self.brig3 = User.objects.get(username='******') self.tour1 = Tour.objects.get_or_create_by_week_in_current_year(1)
def setUp(self): self.client = APIClient() locations_testing.create_workshops_sections_and_cells() sows_testing.create_statuses() sows_testing.create_boars() staff_testing.create_svinbin_users() self.tour1 = Tour.objects.get_or_create_by_week_in_current_year(week_number=1) self.loc_ws1 = Location.objects.get(workshop__number=1) self.loc_ws2 = Location.objects.get(workshop__number=2) self.brig1 = User.objects.get(username='******') self.brig2 = User.objects.get(username='******') self.brig3 = User.objects.get(username='******')
def setUp(self): self.client = APIClient() locations_testing.create_workshops_sections_and_cells() sows_testing.create_statuses() sows_testing.create_boars() sows_events_testing.create_types() staff_testing.create_svinbin_users() self.boar = Boar.objects.all().first() self.user = staff_testing.create_employee() # is_seminator = True self.brig1 = User.objects.get(username='******') self.brig2 = User.objects.get(username='******') self.brig3 = User.objects.get(username='******') self.brig4 = User.objects.get(username='******') self.brig5 = User.objects.get(username='******')
def setUp(self): self.client = APIClient() locations_testing.create_workshops_sections_and_cells() sows_testing.create_statuses() sows_testing.create_boars() sows_events_testing.create_types() piglets_testing.create_piglets_statuses() staff_testing.create_svinbin_users() self.user = staff_testing.create_employee() self.boar = Boar.objects.all().first() self.tour1 = Tour.objects.get_or_create_by_week_in_current_year(week_number=1) self.tour2 = Tour.objects.get_or_create_by_week_in_current_year(week_number=2) self.tour3 = Tour.objects.get_or_create_by_week_in_current_year(week_number=3) self.tour4 = Tour.objects.get_or_create_by_week_in_current_year(week_number=4) self.loc_ws1 = Location.objects.get(workshop__number=1) self.loc_ws2 = Location.objects.get(workshop__number=2) self.loc_ws3 = Location.objects.get(workshop__number=3) self.loc_ws3_sec1 = Location.objects.get(section__workshop__number=3, section__number=1) self.loc_ws3_sec2 = Location.objects.get(section__workshop__number=3, section__number=2) self.loc_ws4 = Location.objects.get(workshop__number=4) self.loc_ws4_cell1 = Location.objects.filter(pigletsGroupCell__isnull=False)[0] self.loc_ws4_cell2 = Location.objects.filter(pigletsGroupCell__isnull=False)[1] self.loc_ws8 = Location.objects.get(workshop__number=8) self.loc_ws5 = Location.objects.get(workshop__number=5) self.loc_ws6 = Location.objects.get(workshop__number=6) self.loc_ws7 = Location.objects.get(workshop__number=7) self.brig1 = User.objects.get(username='******') self.brig2 = User.objects.get(username='******') self.brig3 = User.objects.get(username='******') self.brig4 = User.objects.get(username='******') self.brig5 = User.objects.get(username='******')
def setUp(self): locations_testing.create_workshops_sections_and_cells() sows_testing.create_statuses() sows_testing.create_boars() sows_events_testing.create_types() self.boar1 = Boar.objects.all().first()