Exemplo n.º 1
0
 def testThirdQuarterJuly(self):
  """createpriordaysmaster should produce the right days for a quartly test """
  result = snapintime.createpriordaysmaster("7","9","quarterly")
  self.assertEqual((['4','5','6'],[]),result)
Exemplo n.º 2
0
 def testWeeklyEarlyinMonthAug(self):
  """createpriordaysmaster should produce the right days for a weekly test if it has to go to the previous month"""
  result = snapintime.createpriordaysmaster("8","9","weekly")
  self.assertEqual((['7','8'],[[27,28,29,30,31],[1,2]]),result)
Exemplo n.º 3
0
 def testSecondQuarterJune(self):
  """createpriordaysmaster should produce the right days for a quartly test """
  result = snapintime.createpriordaysmaster("6","9","quarterly")
  self.assertEqual((['1','2','3'],[]),result)   
Exemplo n.º 4
0
 def testDaily(self):
   """createpriordaysmaster should produce the right days for a daily test in the middle of the month"""
   result = snapintime.createpriordaysmaster("1","14","daily")
   self.assertEqual(('1',[12]),result)
Exemplo n.º 5
0
 def testWeeklyEarlyinMonthMarch(self):
   """createpriordaysmaster should produce the right days for a weekly test if it has to go to the previous month"""
   result = snapintime.createpriordaysmaster("3","9","weekly")
   self.assertEqual((['2','3'],[[24,25,26,27,28],[1,2]]),result)
Exemplo n.º 6
0
 def testWeeklyEarlyinMonthFeb4(self):
  """createpriordaysmaster should produce the right days for a weekly test if it has to go to the previous month."""
  result = snapintime.createpriordaysmaster("2","6","weekly")
  self.assertEqual((['1','2'],[[24,25,26,27,28,29,30],[]]),result)
Exemplo n.º 7
0
 def testWeeklyEarliestinMonthFeb(self):
  """createpriordaysmaster should produce the right days for a weekly test if it has to go to the previous month, even if it's day 1"""
  result = snapintime.createpriordaysmaster("2","1","weekly")
  self.assertEqual((['1','2'],[[19,20,21,22,23,24,25],[]]),result)
Exemplo n.º 8
0
 def testWeeklyEarlyinMonthFeb2(self):
  """createpriordaysmaster should produce the right days for a weekly test if it has to go to the previous month."""
  result = snapintime.createpriordaysmaster("2","12","weekly")
  self.assertEqual((['1','2'],[[30,31],[1,2,3,4,5]]),result)
Exemplo n.º 9
0
 def testWeekly2(self):
  """createpriordaysmaster should produce the right days for a weekly test - 7 days later"""
  result = snapintime.createpriordaysmaster("1","21","weekly")
  self.assertEqual((['1'],[8,9,10,11,12,13,14]),result)
Exemplo n.º 10
0
 def testWeekly(self):
  """createpriordaysmaster should produce the right days for a weekly test"""
  result = snapintime.createpriordaysmaster("1","14","weekly")
  self.assertEqual((['1'],[1,2,3,4,5,6,7]),result)
Exemplo n.º 11
0
 def testDailyMonthDay2Feb(self):
   """createpriordaysmaster should produce the right days for a daily test first of the month"""
   result = snapintime.createpriordaysmaster("2","2","daily")
   self.assertEqual(('1',[31]),result)
Exemplo n.º 12
0
 def testFourthQuarterDecember(self):
  """createpriordaysmaster should produce the right days for a quartly test """
  result = snapintime.createpriordaysmaster("12","9","quarterly")
  self.assertEqual((['7','8','9'],[]),result)