def test_determine_commencement_period(self):
     pr = ProcessRoyalties()
     self.assertEqual(pr.determine_commencement_period(201501, date(2014, 12, 1)), 0.08)
     self.assertEqual(pr.determine_commencement_period(201501, date(2014, 12, 31)), 0)
     self.assertEqual(pr.determine_commencement_period(201501, date(2014, 1, 1)), 1)
     self.assertEqual(pr.determine_commencement_period(201501, date(2010, 11, 30)), 4.09)
     self.assertEqual(pr.determine_commencement_period(201501, date(2010, 1, 1)), 5)
     self.assertEqual(pr.determine_commencement_period(201501, date(2010, 1, 31)), 4.92)
     self.assertEqual(pr.determine_commencement_period(201501, date(2010, 1, 1)), 5.0)
     self.assertEqual(pr.determine_commencement_period(None, None), 5)
     self.assertEqual(pr.determine_commencement_period(201501, datetime(2003, 1, 1)), 12.01)
     return
 def test_determineCommencementPeriod(self):
     pr = ProcessRoyalties()
     self.assertEqual(pr.determine_commencement_period(201501, datetime(2015, 1, 1)), 0)
     self.assertEqual(pr.determine_commencement_period(201501, datetime(2014, 12, 1)), 0.08)
     self.assertEqual(pr.determine_commencement_period(201501, datetime(2014, 11, 15)), 0.13)
     self.assertEqual(pr.determine_commencement_period(201501, datetime(2014, 1, 1)), 1)
     self.assertEqual(pr.determine_commencement_period(201501, datetime(2014, 1, 1)), 1)
     self.assertEqual(pr.determine_commencement_period(201501, datetime(2010, 1, 1)), 5)
     self.assertEqual(pr.determine_commencement_period(201501, datetime(2009, 12, 1)), 5.09)
     self.assertEqual(pr.determine_commencement_period(201501, None), 5)