예제 #1
0
 def test_does_not_need_restart(self, m_datetime, m_exists, getmtime):
     m_exists.return_value = True
     m_datetime.utcfromtimestamp.return_value = datetime.utcnow(
     ) - timedelta(days=1)
     result = worker.sentinel(worker.restart_file_path)
     assert not result
예제 #2
0
 def test_restart_file_path_doesnt_exist(self, m_exists):
     m_exists.return_value = False
     result = worker.sentinel(worker.restart_file_path)
     assert not result