diff --git a/smash/web/tests/forms/test_AppointmentAddForm.py b/smash/web/tests/forms/test_AppointmentAddForm.py index a63675e57ba5affc5d5e7b3c70a7dfda3d5074e7..d1f507ec58cc7d98c80fef696715403948b42d9f 100644 --- a/smash/web/tests/forms/test_AppointmentAddForm.py +++ b/smash/web/tests/forms/test_AppointmentAddForm.py @@ -1,3 +1,4 @@ +# coding=utf-8 from django.test import TestCase from web.forms import AppointmentAddForm @@ -21,6 +22,7 @@ class AppointmentAddFormTests(TestCase): 'length': '50', 'visit': self.visit.id, 'location': location.id, + 'comment': u'A unicode comment with weird letters such as á è ü ñ ô', 'datetime_when': "2020-01-01", } diff --git a/smash/web/tests/view/test_appointments.py b/smash/web/tests/view/test_appointments.py index 6c990ea720c7965a29db37abb85a645fc5722b7d..02b8f6ac99a44c87f17e493c4713c2a42ab072f5 100644 --- a/smash/web/tests/view/test_appointments.py +++ b/smash/web/tests/view/test_appointments.py @@ -39,6 +39,7 @@ class AppointmentsViewTests(LoggedInTestCase): form_data['datetime_when'] = datetime.datetime.today() form_data['location'] = location.id form_data['length'] = 10 + form_data['comment'] = u'A comment with weird letters such as á è ü ñ ô' response = self.client.post(reverse('web.views.appointment_add_general'), data=form_data) self.assertEqual(response.status_code, 302) @@ -64,7 +65,7 @@ class AppointmentsViewTests(LoggedInTestCase): subject = create_study_subject() visit = create_visit(subject) appointment = create_appointment(visit, when=datetime.datetime.now()) - new_comment = 'new comment' + new_comment = u'new unicode comment with accents à è ì ò ù' new_status = appointment.APPOINTMENT_STATUS_NO_SHOW new_last_name = "new last name" form_data = self.prepare_form(appointment, subject)