def test_attendance_organizations_list_attendance(client, web2py): """ test customers list for an organization """ populate_reports_attendance_organizations(web2py) url = '/reports/attendance_organizations_list_attendance?year=2014&month=1&soID=1' client.get(url) assert client.status == 200 # Check display of attendance from other organizations assert '2014-01-06' in client.text assert '2014-01-13' in client.text assert '2014-01-27' in client.text assert 'customer_1' in client.text assert '<span class="orange bold">Classcard_0</span>' in client.text
def test_attendance_organizations(client, web2py): """ Is the report showing correctly? """ populate_reports_attendance_organizations(web2py) url = '/reports/attendance_organizations?year=2014&month=1' client.get(url) assert client.status == 200 assert 'Resolve class price</div><div class="col-md-5"><span>€ 10.00' in client.text assert 'Classes taught</div><div class="col-md-5">8' in client.text assert 'Total attendance</div><div class="col-md-5"><a href="/reports/attendance_organizations_list_attendance?month=1&soID=1&year=2014">3</a>' in client.text assert 'Attendance from Organization_1</div><div class="col-md-5">1' in client.text # check resolve assert 'Organization_1 owes Organization_0</div><div class="col-md-5"><span>€ 10.00</span>' in client.text