[ADD] tests and fix for 'wrong opening bracket'

https://code.launchpad.net/~agilebg/hr-timesheet/fix-hr_attendance_analysis-bracket/+merge/221278