Esempio n. 1
0
 def test_sheet_range_daily(self):
     self.company.sheet_range = "DAILY"
     sheet = Form(self.sheet_model.with_user(self.user)).save()
     sheet._compute_name()
     self.assertEqual(sheet.date_start, sheet.date_end)
Esempio n. 2
0
 def test_sheet_range_monthly(self):
     self.company.sheet_range = "MONTHLY"
     sheet = Form(self.sheet_model.with_user(self.user)).save()
     sheet._compute_name()
     self.assertEqual(sheet.date_start.day, 1)
     self.assertEqual(sheet.date_start.month, sheet.date_end.month)