unit tests for heartbeat class

This commit is contained in:
Alan Hamlett 2017-11-22 19:29:04 -08:00
parent 8269196c88
commit 28cb3e2b28
2 changed files with 111 additions and 1 deletions

View file

@ -62,7 +62,7 @@ class Heartbeat(object):
return
if self.type == 'file':
self.entity = format_file_path(self.entity)
if self.type == 'file' and not os.path.isfile(self.entity):
if self.type == 'file' and (not self.entity or not os.path.isfile(self.entity)):
self.skip = u('File does not exist; ignoring this heartbeat.')
return