flectra/addons/hr_attendance/tests/test_hr_attendance_process.py

20 lines
706 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2018-01-16 11:34:37 +01:00
from flectra.tests.common import TransactionCase
class TestHrAttendance(TransactionCase):
"""Test for presence validity"""
def setUp(self):
super(TestHrAttendance, self).setUp()
self.test_employee = self.browse_ref('hr.employee_al')
def test_employee_state(self):
# Make sure the attendance of the employee will display correctly
assert self.test_employee.attendance_state == 'checked_out'
self.test_employee.attendance_action_change()
assert self.test_employee.attendance_state == 'checked_in'
self.test_employee.attendance_action_change()
assert self.test_employee.attendance_state == 'checked_out'