Beispiel #1
0
 def test_store_date(self):
     """If store the current date"""
     testDate = datetime.now()
     with mock.patch('clean_sentinel.pickle.dump') as pDump, \
          mock.patch('clean_sentinel.open'):
         set_reference_date()
     self.assertTrue(testDate < pDump.call_args[0][0])
 def test_store_date(self):
     """If store the current date"""
     testDate = datetime.now()
     with mock.patch('clean_sentinel.pickle.dump') as pDump, \
          mock.patch('clean_sentinel.open'):
         set_reference_date()
     self.assertTrue(testDate < pDump.call_args[0][0])
 def run(self):
     """Run the actual routine in clean_sentinel"""
     try:
         set_reference_date()
     except StandardError as e:
         print(e.args, file=sys.stderr)
         sys.exit()
     except pickle.PicklingError:
         print('Pickle Failure', file=sys.stderr)
         sys.exit()
Beispiel #4
0
 def run(self):
     """Run the actual routine in clean_sentinel"""
     try:
         set_reference_date()
     except BaseException as e:
         print(e.args, file=sys.stderr)
         sys.exit()
     except pickle.PicklingError:
         print('Pickle Failure', file=sys.stderr)
         sys.exit()