fix tests

This commit is contained in:
sadnub 2021-02-20 23:18:54 -05:00
parent e192f8db52
commit 4181449aea
4 changed files with 16 additions and 10 deletions

View File

@ -45,7 +45,7 @@ workstation_agent = agent.extend(
online_agent = agent.extend(last_seen=djangotime.now())
overdue_agent = agent.extend(
last_seen=djangotime.now() - djangotime.timedelta(minutes=6)
last_seen=djangotime.now() - djangotime.timedelta(minutes=35)
)
agent_with_services = agent.extend(

View File

@ -790,9 +790,11 @@ class Agent(BaseAuditModel):
or self.overdue_text_alert
or (
alert_template
and alert_template.agent_always_alert
or alert_template.agent_always_email
or alert_template.agent_always_text
and (
alert_template.agent_always_alert
or alert_template.agent_always_email
or alert_template.agent_always_text
)
)
):
alert = Alert.create_availability_alert(self)

View File

@ -307,9 +307,11 @@ class AutomatedTask(BaseAuditModel):
or self.text_alert
or (
alert_template
and alert_template.task_always_alert
or alert_template.task_always_email
or alert_template.task_always_text
and (
alert_template.task_always_alert
or alert_template.task_always_email
or alert_template.task_always_text
)
)
):
alert = Alert.create_task_alert(self)

View File

@ -339,9 +339,11 @@ class Check(BaseAuditModel):
or self.text_alert
or (
alert_template
and alert_template.check_always_alert
or alert_template.check_always_email
or alert_template.check_always_text
and (
alert_template.check_always_alert
or alert_template.check_always_email
or alert_template.check_always_text
)
)
):
alert = Alert.create_check_alert(self)