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')
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)
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')