diff --git a/smash/web/models/worker.py b/smash/web/models/worker.py index 85037ed18446e0149e3e8ef8d417eb666cec6ab2..6f8dec148528d61074af238e158ff46d405d0134 100644 --- a/smash/web/models/worker.py +++ b/smash/web/models/worker.py @@ -185,7 +185,7 @@ class Worker(models.Model): start_date = start_date.replace(hour=0, minute=0, second=0) end_date = start_date + datetime.timedelta(days=1) - office_availability = OfficeAvailability('{} {}'.format(self.first_name, self.last_name), start=start_date, end=end_date) + office_availability = OfficeAvailability(u'{} {}'.format(self.first_name, self.last_name), start=start_date, end=end_date) #Appointments subject_appointments = AppointmentTypeLink.objects.filter(worker=self.id, date_when__gte=start_date, date_when__lte=end_date) diff --git a/smash/web/tests/test_office_availability.py b/smash/web/tests/test_office_availability.py index b1184285f2c0c768d27ce8874f3cf776f474f9d0..0bfbc6355204244d24c8b90f0aeafff314e038aa 100644 --- a/smash/web/tests/test_office_availability.py +++ b/smash/web/tests/test_office_availability.py @@ -1,3 +1,4 @@ +# coding=utf-8 import logging from django.test import TestCase @@ -24,7 +25,7 @@ class OfficeAvailabilityTest(TestCase): start_date = datetime.datetime(today.year, today.month, today.day, tzinfo=today.tzinfo) #today midnight end_date = start_date + datetime.timedelta(days=1) - office_availability = OfficeAvailability('FirstName LastName', + office_availability = OfficeAvailability(u'{} {}'.format('âêîôûŵŷäëïöüẅÿà ', 'èìòùáºá»³Ã¡Ã©Ãóúẃýćńóśźżąę'), start=start_date, end=end_date, office_start='8:00', office_end='18:00') #no availabilties added yet