Exemple #1
0
 def testSanitizeInputDates(self):
     """should always return a list"""
     san = InputHelper.sanitize_dates(None)
     self.assertListEqual(
         [], san, 'should return an empty list if no dates are specified')
     san = InputHelper.sanitize_dates(['2013.05.22'])
     self.assertListEqual(
         ['2013.05.22'], san,
         'should return the same list if dates are specified')
Exemple #2
0
    def run(self, args):
        # parse and verify user arguments
        users = InputHelper.sanitize_users(args.user)
        dates = InputHelper.sanitize_dates(args.date)
        InputHelper.ensure_max_2_dates(dates)

        # print output to console
        self._output(self._get_projects(dates, users), users)
Exemple #3
0
    def run(self, args):
        # parse and verify user arguments
        users = InputHelper.sanitize_users(args.user)
        dates = InputHelper.sanitize_dates(args.date)
        InputHelper.ensure_max_2_dates(dates)

        # print output to console
        self._output(self._get_projects(dates, users), users)
Exemple #4
0
 def testSanitizeInputDates(self):
     """should always return a list"""
     san = InputHelper.sanitize_dates(None)
     self.assertListEqual([], san, 'should return an empty list if no dates are specified')
     san = InputHelper.sanitize_dates(['2013.05.22'])
     self.assertListEqual(['2013.05.22'], san, 'should return the same list if dates are specified')