def setUp(self): # too lazy to re create 'scheduler.json', so put in the # future semesters we need for i in range(13, 33): for sem in ['A', 'B']: semester = "%s%s" % (i, sem) s = DSSSemester(semester = semester) s.save() # I'm too lazy to fix the scheduler.json - missing commissioning c = Observing_Type.objects.get_or_create(type = 'commissioning') self.sponsor = DSSSponsor(name = "WVU", abbreviation = "WVU") self.sponsor.save() # get the one proposal and it's one session self.proposal = Proposal.objects.all()[0] s = self.proposal.session_set.all()[0] # give it some values so it will show up s.grade = SessionGrade.objects.get(grade = 'A') s.target.min_lst = 0.0 s.target.max_lst = hr2rad(12.5) s.target.save() time = 6.5 # hrs s.allotment.allocated_time = time # hrs s.allotment.allocated_repeats = 1 s.allotment.save() s.save() self.session = s
def setUp(self): # too lazy to re create 'scheduler.json', so put in the # future semesters we need for i in range(13, 33): for sem in ['A', 'B']: semester = "%s%s" % (i, sem) s = DSSSemester(semester = semester) s.save()