Skip to content
Snippets Groups Projects
Commit 65e5810f authored by Carlos Vega's avatar Carlos Vega
Browse files

tests to reproduce encoding errors when adding an appointment

parent 6376e717
No related branches found
No related tags found
1 merge request!259Encoding issue
# coding=utf-8
from django.test import TestCase
from web.forms import AppointmentEditForm, AppointmentAddForm
......@@ -19,6 +20,7 @@ class AppointmentEditFormTests(TestCase):
self.sample_data = {'first_name': 'name',
'length': '50',
'location': location.id,
'comment': u'A unicode comment with weird letters such as á è ü ñ ô',
'datetime_when': "2020-01-01",
}
self.sample_data_with_status = self.sample_data
......
# coding=utf-8
import datetime
import logging
......@@ -49,6 +50,7 @@ class AppointmentsViewTests(LoggedInTestCase):
form_appointment = AppointmentAddForm(user=self.user)
form_data['datetime_when'] = datetime.datetime.today()
form_data['location'] = location.id
form_data['comment'] = u'A comment with weird letters such as á è ü ñ ô'
form_data['length'] = 10
response = self.client.post(reverse('web.views.appointment_add',
kwargs={'visit_id': visit.id}), data=form_data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment