def test_monitor_ac_usage_turn_off(fake_events, arduino, app):
    old_event = fake_events.timestamp
    monitor_ac_usage(1)
    new_event = Event.last_event()
    old_event = Event.query.filter(Event.timestamp == old_event).first()

    assert naturally_equivalent(old_event, new_event) is False
    assert new_event.event == EventType.off
    assert new_event.event_description == "AutoOff Timer"
def test_monitor_ac_usage_leave_on(fake_events, arduino):
    old_event = fake_events.timestamp
    monitor_ac_usage()
    new_event = Event.last_event()
    old_event = Event.query.filter(Event.timestamp == old_event).first()

    assert naturally_equivalent(old_event, new_event)
    assert new_event.event == EventType.on
    assert new_event.event_description is None