def test_get_file_last_modified_time_for_valid_file(self): test_file = tempfile.NamedTemporaryFile(dir=self.tmp_dir_1, delete=True) file_last_modified_time = FileUtil.get_file_last_modified_time( test_file.name) time.sleep(2) self.assertTrue(int(time.time() - file_last_modified_time) > 1)
def test_get_file_last_modified_time_for_valid_file(self): test_file = tempfile.NamedTemporaryFile(dir=self.tmp_dir_1, delete=True) file_last_modified_time = FileUtil.get_file_last_modified_time(test_file.name) time.sleep(2) self.assertTrue(int(time.time() - file_last_modified_time) > 1)
def test_get_file_last_modified_time_for_invalid_file(self): self.assertIsNone(FileUtil.get_file_last_modified_time('/tmp/xyz.gpg'))
def test_get_file_last_modified_time_for_invalid_file(self): self.assertIsNone(FileUtil.get_file_last_modified_time('/tmp/xyz.gpg'))