From 1ec4ad937602a52db6913e8ee9103fdb59be59f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= <zebuline@entrouvert.com>
Date: Tue, 27 Jul 2021 15:19:00 +0200
Subject: [PATCH 1/2] misc: apply pyupgrade (#55867)

---
 .../sync_desks_timeperiod_exceptions.py       |   3 +-
 chrono/agendas/migrations/0001_initial.py     |   3 -
 chrono/agendas/migrations/0002_event.py       |   3 -
 chrono/agendas/migrations/0003_booking.py     |   3 -
 .../0004_booking_cancellation_datetime.py     |   3 -
 chrono/agendas/migrations/0005_event_label.py |   3 -
 .../migrations/0006_auto_20160707_1357.py     |   3 -
 .../migrations/0007_auto_20160722_1135.py     |   3 -
 .../migrations/0008_auto_20160910_1319.py     |   3 -
 .../migrations/0009_auto_20160911_1640.py     |   3 -
 .../migrations/0010_auto_20160918_1250.py     |   3 -
 .../migrations/0011_meetingtype_slug.py       |   3 -
 .../0012_manual_set_slugs_on_meeting_types.py |   3 -
 .../migrations/0013_auto_20161028_1603.py     |   3 -
 .../0014_booking_primary_booking.py           |   3 -
 .../migrations/0015_auto_20170628_1137.py     |   3 -
 chrono/agendas/migrations/0016_desk.py        |   3 -
 .../migrations/0017_timeperiod_desk.py        |   3 -
 chrono/agendas/migrations/0018_event_desk.py  |   3 -
 .../migrations/0019_timeperiodexception.py    |   3 -
 .../migrations/0020_auto_20171102_1021.py     |   3 -
 .../migrations/0021_auto_20171126_1330.py     |   3 -
 .../migrations/0022_auto_20171202_1828.py     |   3 -
 .../migrations/0023_auto_20171202_1835.py     |   3 -
 .../migrations/0024_auto_20180426_1127.py     |   2 -
 .../migrations/0025_auto_20181206_1252.py     |   2 -
 .../0026_booking_user_display_label.py        |   2 -
 .../migrations/0027_event_description.py      |   2 -
 chrono/agendas/migrations/0028_event_slug.py  |   3 -
 .../migrations/0029_auto_20191106_1320.py     |   2 -
 .../migrations/0030_auto_20191107_1200.py     |   3 -
 .../migrations/0031_auto_20191107_1225.py     |   6 +-
 .../migrations/0032_auto_20191127_0919.py     |   4 +-
 .../0033_timeperiodexceptionsource.py         |   3 -
 .../agendas/migrations/0034_initial_source.py |   3 -
 ...e_desk_timeperiod_exceptions_remote_url.py |   2 -
 .../migrations/0036_auto_20191223_1758.py     |   2 -
 ...0037_timeperiodexceptionsource_ics_file.py |   3 -
 .../migrations/0038_start_virtual_agendas.py  |   2 -
 .../agendas/migrations/0039_booking_delays.py |   2 -
 .../migrations/0040_timeperiod_agenda.py      |   2 -
 .../0041_clean_event_slug_unicity.py          |   3 -
 .../0043_booking_user_external_id.py          |   3 -
 .../migrations/0044_event_publication_date.py |   3 -
 .../migrations/0045_agenda_resources.py       |   3 -
 .../agendas/migrations/0046_event_duration.py |   2 -
 .../migrations/0047_auto_20200617_1521.py     |   2 -
 .../0048_meeting_type_deleted_flag.py         |   2 -
 chrono/agendas/migrations/0049_event_slug.py  |   3 -
 chrono/agendas/migrations/0050_event_slug.py  |   3 -
 .../agendas/migrations/0051_default_view.py   |   3 -
 .../0052_event_date_range_constraint.py       |   3 -
 .../0053_event_date_range_constraint.py       |   3 -
 .../migrations/0054_agenda_categories.py      |   3 -
 .../0055_booking_cancel_callback_url.py       |   2 -
 .../migrations/0056_auto_20200811_1611.py     |   2 -
 .../migrations/0057_auto_20200831_1634.py     |   2 -
 .../0058_timeperiodexception_external.py      |   2 -
 .../migrations/0059_event_almost_full.py      |   2 -
 .../migrations/0060_auto_20200903_1041.py     |   2 -
 .../migrations/0061_auto_20200909_1752.py     |   2 -
 .../migrations/0062_auto_20200915_1401.py     |   2 -
 .../migrations/0063_auto_20200928_1445.py     |   2 -
 .../migrations/0064_booking_form_url.py       |   3 -
 .../0065_unavailability_calendar.py           |   2 -
 ...iodexceptionsource_unique_settings_slug.py |   2 -
 .../migrations/0067_auto_20201021_1746.py     |   4 +-
 ...068_remove_timeperiodexception_external.py |   2 -
 .../migrations/0069_translate_holidays.py     |   2 -
 .../migrations/0070_auto_20201202_1834.py     |   4 +-
 .../migrations/0071_booking_attendance.py     |   3 -
 .../migrations/0072_booking_absence_reason.py |   3 -
 .../migrations/0073_auto_20210125_1800.py     |   4 +-
 .../agendas/migrations/0074_simple_desks.py   |   3 -
 .../migrations/0075_auto_20210216_1553.py     |   2 -
 .../0076_event_recurrence_end_date.py         |   2 -
 .../migrations/0077_meetings_default_view.py  |   3 -
 .../migrations/0078_absence_reasons.py        |   3 -
 .../0080_create_exceptions_desks.py           |   2 -
 chrono/agendas/models.py                      |  21 ++-
 chrono/api/utils.py                           |   1 -
 chrono/api/views.py                           |  10 +-
 chrono/manager/forms.py                       |   1 -
 .../management/commands/import_site.py        |   2 +-
 chrono/manager/views.py                       |  34 ++---
 chrono/utils/spooler.py                       |   1 -
 setup.py                                      |   3 +-
 tests/api/conftest.py                         |  10 +-
 tests/api/test_all.py                         |  12 +-
 tests/api/test_booking.py                     |  16 +-
 tests/api/test_datetimes.py                   |  10 +-
 tests/api/test_event.py                       |   2 -
 tests/api/test_fillslot.py                    |  32 ++--
 tests/api/test_meetings_datetimes.py          |  26 ++--
 tests/api/test_statistics.py                  |   2 -
 tests/manager/conftest.py                     |   2 +-
 tests/manager/test_absence_reason.py          |   8 +-
 tests/manager/test_all.py                     | 102 +++++++------
 tests/manager/test_category.py                |  10 +-
 tests/manager/test_event.py                   |  64 ++++----
 tests/manager/test_resource.py                |  22 ++-
 tests/manager/test_unavailability_calendar.py |   8 +-
 tests/test_agendas.py                         | 139 +++++++++---------
 tests/test_ensure_jsonbfields.py              |   2 -
 tests/test_import_export.py                   |  24 ++-
 tests/test_requests.py                        |   6 +-
 tests/test_time_periods.py                    |  16 +-
 107 files changed, 277 insertions(+), 524 deletions(-)

diff --git a/chrono/agendas/management/commands/sync_desks_timeperiod_exceptions.py b/chrono/agendas/management/commands/sync_desks_timeperiod_exceptions.py
index 6d6950d..fce0342 100644
--- a/chrono/agendas/management/commands/sync_desks_timeperiod_exceptions.py
+++ b/chrono/agendas/management/commands/sync_desks_timeperiod_exceptions.py
@@ -14,7 +14,6 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from __future__ import print_function
 
 import sys
 
@@ -39,5 +38,5 @@ class Command(BaseCommand):
                 source.refresh_timeperiod_exceptions_from_ics()
             except ICSError as e:
                 print(
-                    u'unable to create timeperiod exceptions for "%s": %s' % (source.desk, e), file=sys.stderr
+                    'unable to create timeperiod exceptions for "%s": %s' % (source.desk, e), file=sys.stderr
                 )
diff --git a/chrono/agendas/migrations/0001_initial.py b/chrono/agendas/migrations/0001_initial.py
index 71e3d60..f973c32 100644
--- a/chrono/agendas/migrations/0001_initial.py
+++ b/chrono/agendas/migrations/0001_initial.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0002_event.py b/chrono/agendas/migrations/0002_event.py
index 4bd52d9..23507d7 100644
--- a/chrono/agendas/migrations/0002_event.py
+++ b/chrono/agendas/migrations/0002_event.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0003_booking.py b/chrono/agendas/migrations/0003_booking.py
index 4593e03..7705830 100644
--- a/chrono/agendas/migrations/0003_booking.py
+++ b/chrono/agendas/migrations/0003_booking.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.contrib.postgres.fields import JSONField
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0004_booking_cancellation_datetime.py b/chrono/agendas/migrations/0004_booking_cancellation_datetime.py
index d5d3fbc..42d6d64 100644
--- a/chrono/agendas/migrations/0004_booking_cancellation_datetime.py
+++ b/chrono/agendas/migrations/0004_booking_cancellation_datetime.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0005_event_label.py b/chrono/agendas/migrations/0005_event_label.py
index b6f80b4..d579fb8 100644
--- a/chrono/agendas/migrations/0005_event_label.py
+++ b/chrono/agendas/migrations/0005_event_label.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0006_auto_20160707_1357.py b/chrono/agendas/migrations/0006_auto_20160707_1357.py
index 5046f95..7ae4877 100644
--- a/chrono/agendas/migrations/0006_auto_20160707_1357.py
+++ b/chrono/agendas/migrations/0006_auto_20160707_1357.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 import datetime
 
 from django.db import migrations, models
diff --git a/chrono/agendas/migrations/0007_auto_20160722_1135.py b/chrono/agendas/migrations/0007_auto_20160722_1135.py
index eadaf23..3cb38af 100644
--- a/chrono/agendas/migrations/0007_auto_20160722_1135.py
+++ b/chrono/agendas/migrations/0007_auto_20160722_1135.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0008_auto_20160910_1319.py b/chrono/agendas/migrations/0008_auto_20160910_1319.py
index 9d3c511..1ffa65b 100644
--- a/chrono/agendas/migrations/0008_auto_20160910_1319.py
+++ b/chrono/agendas/migrations/0008_auto_20160910_1319.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 import django
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0009_auto_20160911_1640.py b/chrono/agendas/migrations/0009_auto_20160911_1640.py
index c019b8b..4e0fb07 100644
--- a/chrono/agendas/migrations/0009_auto_20160911_1640.py
+++ b/chrono/agendas/migrations/0009_auto_20160911_1640.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0010_auto_20160918_1250.py b/chrono/agendas/migrations/0010_auto_20160918_1250.py
index 407c8e9..fe1b8e7 100644
--- a/chrono/agendas/migrations/0010_auto_20160918_1250.py
+++ b/chrono/agendas/migrations/0010_auto_20160918_1250.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0011_meetingtype_slug.py b/chrono/agendas/migrations/0011_meetingtype_slug.py
index 8ab2c67..093258f 100644
--- a/chrono/agendas/migrations/0011_meetingtype_slug.py
+++ b/chrono/agendas/migrations/0011_meetingtype_slug.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0012_manual_set_slugs_on_meeting_types.py b/chrono/agendas/migrations/0012_manual_set_slugs_on_meeting_types.py
index b89564d..47fb53a 100644
--- a/chrono/agendas/migrations/0012_manual_set_slugs_on_meeting_types.py
+++ b/chrono/agendas/migrations/0012_manual_set_slugs_on_meeting_types.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations
 from django.utils.text import slugify
 
diff --git a/chrono/agendas/migrations/0013_auto_20161028_1603.py b/chrono/agendas/migrations/0013_auto_20161028_1603.py
index 456af26..c214ced 100644
--- a/chrono/agendas/migrations/0013_auto_20161028_1603.py
+++ b/chrono/agendas/migrations/0013_auto_20161028_1603.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0014_booking_primary_booking.py b/chrono/agendas/migrations/0014_booking_primary_booking.py
index 23fd6e2..8a05071 100644
--- a/chrono/agendas/migrations/0014_booking_primary_booking.py
+++ b/chrono/agendas/migrations/0014_booking_primary_booking.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0015_auto_20170628_1137.py b/chrono/agendas/migrations/0015_auto_20170628_1137.py
index 8feb554..43a540d 100644
--- a/chrono/agendas/migrations/0015_auto_20170628_1137.py
+++ b/chrono/agendas/migrations/0015_auto_20170628_1137.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0016_desk.py b/chrono/agendas/migrations/0016_desk.py
index cfac45f..9413fae 100644
--- a/chrono/agendas/migrations/0016_desk.py
+++ b/chrono/agendas/migrations/0016_desk.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0017_timeperiod_desk.py b/chrono/agendas/migrations/0017_timeperiod_desk.py
index d76803e..c5a54b7 100644
--- a/chrono/agendas/migrations/0017_timeperiod_desk.py
+++ b/chrono/agendas/migrations/0017_timeperiod_desk.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0018_event_desk.py b/chrono/agendas/migrations/0018_event_desk.py
index 4f457de..492e8a0 100644
--- a/chrono/agendas/migrations/0018_event_desk.py
+++ b/chrono/agendas/migrations/0018_event_desk.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0019_timeperiodexception.py b/chrono/agendas/migrations/0019_timeperiodexception.py
index a70ea46..1bafc03 100644
--- a/chrono/agendas/migrations/0019_timeperiodexception.py
+++ b/chrono/agendas/migrations/0019_timeperiodexception.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0020_auto_20171102_1021.py b/chrono/agendas/migrations/0020_auto_20171102_1021.py
index 4bdb3d4..6686bd2 100644
--- a/chrono/agendas/migrations/0020_auto_20171102_1021.py
+++ b/chrono/agendas/migrations/0020_auto_20171102_1021.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 import datetime
 
 from django.db import migrations, models
diff --git a/chrono/agendas/migrations/0021_auto_20171126_1330.py b/chrono/agendas/migrations/0021_auto_20171126_1330.py
index 47b5576..01ab396 100644
--- a/chrono/agendas/migrations/0021_auto_20171126_1330.py
+++ b/chrono/agendas/migrations/0021_auto_20171126_1330.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0022_auto_20171202_1828.py b/chrono/agendas/migrations/0022_auto_20171202_1828.py
index d987880..bae09e1 100644
--- a/chrono/agendas/migrations/0022_auto_20171202_1828.py
+++ b/chrono/agendas/migrations/0022_auto_20171202_1828.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0023_auto_20171202_1835.py b/chrono/agendas/migrations/0023_auto_20171202_1835.py
index b567be4..78c895a 100644
--- a/chrono/agendas/migrations/0023_auto_20171202_1835.py
+++ b/chrono/agendas/migrations/0023_auto_20171202_1835.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0024_auto_20180426_1127.py b/chrono/agendas/migrations/0024_auto_20180426_1127.py
index 2ac2a19..c6a70d0 100644
--- a/chrono/agendas/migrations/0024_auto_20180426_1127.py
+++ b/chrono/agendas/migrations/0024_auto_20180426_1127.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.12 on 2018-04-26 11:27
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0025_auto_20181206_1252.py b/chrono/agendas/migrations/0025_auto_20181206_1252.py
index be9d1d6..d7f0308 100644
--- a/chrono/agendas/migrations/0025_auto_20181206_1252.py
+++ b/chrono/agendas/migrations/0025_auto_20181206_1252.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.12 on 2018-12-06 12:52
-from __future__ import unicode_literals
 
 import django.db.models.deletion
 from django.db import migrations, models
diff --git a/chrono/agendas/migrations/0026_booking_user_display_label.py b/chrono/agendas/migrations/0026_booking_user_display_label.py
index 94a024e..4854e57 100644
--- a/chrono/agendas/migrations/0026_booking_user_display_label.py
+++ b/chrono/agendas/migrations/0026_booking_user_display_label.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.20 on 2019-03-14 15:06
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0027_event_description.py b/chrono/agendas/migrations/0027_event_description.py
index 8c44789..7d38a33 100644
--- a/chrono/agendas/migrations/0027_event_description.py
+++ b/chrono/agendas/migrations/0027_event_description.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.12 on 2019-09-17 06:36
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0028_event_slug.py b/chrono/agendas/migrations/0028_event_slug.py
index 9ef556b..f5cc128 100644
--- a/chrono/agendas/migrations/0028_event_slug.py
+++ b/chrono/agendas/migrations/0028_event_slug.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0029_auto_20191106_1320.py b/chrono/agendas/migrations/0029_auto_20191106_1320.py
index 010c159..358376f 100644
--- a/chrono/agendas/migrations/0029_auto_20191106_1320.py
+++ b/chrono/agendas/migrations/0029_auto_20191106_1320.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2019-11-06 12:20
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0030_auto_20191107_1200.py b/chrono/agendas/migrations/0030_auto_20191107_1200.py
index 3348250..2cff44b 100644
--- a/chrono/agendas/migrations/0030_auto_20191107_1200.py
+++ b/chrono/agendas/migrations/0030_auto_20191107_1200.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations
 from django.utils.text import slugify
 
diff --git a/chrono/agendas/migrations/0031_auto_20191107_1225.py b/chrono/agendas/migrations/0031_auto_20191107_1225.py
index e0c900c..59ea403 100644
--- a/chrono/agendas/migrations/0031_auto_20191107_1225.py
+++ b/chrono/agendas/migrations/0031_auto_20191107_1225.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2019-11-07 11:25
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
@@ -19,10 +17,10 @@ class Migration(migrations.Migration):
         ),
         migrations.AlterUniqueTogether(
             name='desk',
-            unique_together=set([('agenda', 'slug')]),
+            unique_together={('agenda', 'slug')},
         ),
         migrations.AlterUniqueTogether(
             name='meetingtype',
-            unique_together=set([('agenda', 'slug')]),
+            unique_together={('agenda', 'slug')},
         ),
     ]
diff --git a/chrono/agendas/migrations/0032_auto_20191127_0919.py b/chrono/agendas/migrations/0032_auto_20191127_0919.py
index 93bd882..ebd4496 100644
--- a/chrono/agendas/migrations/0032_auto_20191127_0919.py
+++ b/chrono/agendas/migrations/0032_auto_20191127_0919.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.17 on 2019-11-27 08:19
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
@@ -21,6 +19,6 @@ class Migration(migrations.Migration):
         ),
         migrations.AlterUniqueTogether(
             name='event',
-            unique_together=set([('agenda', 'slug')]),
+            unique_together={('agenda', 'slug')},
         ),
     ]
diff --git a/chrono/agendas/migrations/0033_timeperiodexceptionsource.py b/chrono/agendas/migrations/0033_timeperiodexceptionsource.py
index e664fa5..35fc626 100644
--- a/chrono/agendas/migrations/0033_timeperiodexceptionsource.py
+++ b/chrono/agendas/migrations/0033_timeperiodexceptionsource.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 import django.db.models.deletion
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0034_initial_source.py b/chrono/agendas/migrations/0034_initial_source.py
index 9f862dd..75326c4 100644
--- a/chrono/agendas/migrations/0034_initial_source.py
+++ b/chrono/agendas/migrations/0034_initial_source.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations
 
 
diff --git a/chrono/agendas/migrations/0035_remove_desk_timeperiod_exceptions_remote_url.py b/chrono/agendas/migrations/0035_remove_desk_timeperiod_exceptions_remote_url.py
index 6d36c62..7693150 100644
--- a/chrono/agendas/migrations/0035_remove_desk_timeperiod_exceptions_remote_url.py
+++ b/chrono/agendas/migrations/0035_remove_desk_timeperiod_exceptions_remote_url.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2019-12-09 14:24
-from __future__ import unicode_literals
 
 from django.db import migrations
 
diff --git a/chrono/agendas/migrations/0036_auto_20191223_1758.py b/chrono/agendas/migrations/0036_auto_20191223_1758.py
index 00a6717..6c7b66a 100644
--- a/chrono/agendas/migrations/0036_auto_20191223_1758.py
+++ b/chrono/agendas/migrations/0036_auto_20191223_1758.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.17 on 2019-12-23 17:58
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0037_timeperiodexceptionsource_ics_file.py b/chrono/agendas/migrations/0037_timeperiodexceptionsource_ics_file.py
index f346154..ec2a6a7 100644
--- a/chrono/agendas/migrations/0037_timeperiodexceptionsource_ics_file.py
+++ b/chrono/agendas/migrations/0037_timeperiodexceptionsource_ics_file.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 import chrono.agendas.models
diff --git a/chrono/agendas/migrations/0038_start_virtual_agendas.py b/chrono/agendas/migrations/0038_start_virtual_agendas.py
index 9f3bc57..8b8d6d7 100644
--- a/chrono/agendas/migrations/0038_start_virtual_agendas.py
+++ b/chrono/agendas/migrations/0038_start_virtual_agendas.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-02-20 12:15
-from __future__ import unicode_literals
 
 import django.db.models.deletion
 from django.db import migrations, models
diff --git a/chrono/agendas/migrations/0039_booking_delays.py b/chrono/agendas/migrations/0039_booking_delays.py
index fbf81b8..f81d797 100644
--- a/chrono/agendas/migrations/0039_booking_delays.py
+++ b/chrono/agendas/migrations/0039_booking_delays.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-02-25 07:33
-from __future__ import unicode_literals
 
 import django.core.validators
 from django.db import migrations, models
diff --git a/chrono/agendas/migrations/0040_timeperiod_agenda.py b/chrono/agendas/migrations/0040_timeperiod_agenda.py
index 9c76244..70afb18 100644
--- a/chrono/agendas/migrations/0040_timeperiod_agenda.py
+++ b/chrono/agendas/migrations/0040_timeperiod_agenda.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-02-26 13:27
-from __future__ import unicode_literals
 
 import django.db.models.deletion
 from django.db import migrations, models
diff --git a/chrono/agendas/migrations/0041_clean_event_slug_unicity.py b/chrono/agendas/migrations/0041_clean_event_slug_unicity.py
index d1aa17f..e8e7612 100644
--- a/chrono/agendas/migrations/0041_clean_event_slug_unicity.py
+++ b/chrono/agendas/migrations/0041_clean_event_slug_unicity.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 import django
 from django.db import migrations
 
diff --git a/chrono/agendas/migrations/0043_booking_user_external_id.py b/chrono/agendas/migrations/0043_booking_user_external_id.py
index b5cade7..5d2f907 100644
--- a/chrono/agendas/migrations/0043_booking_user_external_id.py
+++ b/chrono/agendas/migrations/0043_booking_user_external_id.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0044_event_publication_date.py b/chrono/agendas/migrations/0044_event_publication_date.py
index e82dc82..b5dffb8 100644
--- a/chrono/agendas/migrations/0044_event_publication_date.py
+++ b/chrono/agendas/migrations/0044_event_publication_date.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0045_agenda_resources.py b/chrono/agendas/migrations/0045_agenda_resources.py
index 82af14f..7a95003 100644
--- a/chrono/agendas/migrations/0045_agenda_resources.py
+++ b/chrono/agendas/migrations/0045_agenda_resources.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0046_event_duration.py b/chrono/agendas/migrations/0046_event_duration.py
index 69392ac..a6dd2fa 100644
--- a/chrono/agendas/migrations/0046_event_duration.py
+++ b/chrono/agendas/migrations/0046_event_duration.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-05-30 13:13
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0047_auto_20200617_1521.py b/chrono/agendas/migrations/0047_auto_20200617_1521.py
index b928fd8..c861955 100644
--- a/chrono/agendas/migrations/0047_auto_20200617_1521.py
+++ b/chrono/agendas/migrations/0047_auto_20200617_1521.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-06-17 13:21
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0048_meeting_type_deleted_flag.py b/chrono/agendas/migrations/0048_meeting_type_deleted_flag.py
index 6d0e8f0..9badddc 100644
--- a/chrono/agendas/migrations/0048_meeting_type_deleted_flag.py
+++ b/chrono/agendas/migrations/0048_meeting_type_deleted_flag.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-06-17 13:23
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0049_event_slug.py b/chrono/agendas/migrations/0049_event_slug.py
index ba94cd2..e38a36b 100644
--- a/chrono/agendas/migrations/0049_event_slug.py
+++ b/chrono/agendas/migrations/0049_event_slug.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 import uuid
 
 from django.db import migrations
diff --git a/chrono/agendas/migrations/0050_event_slug.py b/chrono/agendas/migrations/0050_event_slug.py
index 370b892..44c0ecf 100644
--- a/chrono/agendas/migrations/0050_event_slug.py
+++ b/chrono/agendas/migrations/0050_event_slug.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 import chrono.agendas.models
diff --git a/chrono/agendas/migrations/0051_default_view.py b/chrono/agendas/migrations/0051_default_view.py
index d2ef824..1cfd4db 100644
--- a/chrono/agendas/migrations/0051_default_view.py
+++ b/chrono/agendas/migrations/0051_default_view.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0052_event_date_range_constraint.py b/chrono/agendas/migrations/0052_event_date_range_constraint.py
index 069ee35..b806f67 100644
--- a/chrono/agendas/migrations/0052_event_date_range_constraint.py
+++ b/chrono/agendas/migrations/0052_event_date_range_constraint.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, transaction
 from django.db.utils import InternalError, OperationalError, ProgrammingError
 
diff --git a/chrono/agendas/migrations/0053_event_date_range_constraint.py b/chrono/agendas/migrations/0053_event_date_range_constraint.py
index 97880bc..5516dd8 100644
--- a/chrono/agendas/migrations/0053_event_date_range_constraint.py
+++ b/chrono/agendas/migrations/0053_event_date_range_constraint.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, transaction
 from django.db.utils import InternalError, OperationalError, ProgrammingError
 
diff --git a/chrono/agendas/migrations/0054_agenda_categories.py b/chrono/agendas/migrations/0054_agenda_categories.py
index 35766d2..216ea28 100644
--- a/chrono/agendas/migrations/0054_agenda_categories.py
+++ b/chrono/agendas/migrations/0054_agenda_categories.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 import django.db.models.deletion
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0055_booking_cancel_callback_url.py b/chrono/agendas/migrations/0055_booking_cancel_callback_url.py
index 466054d..941f991 100644
--- a/chrono/agendas/migrations/0055_booking_cancel_callback_url.py
+++ b/chrono/agendas/migrations/0055_booking_cancel_callback_url.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-07-29 09:42
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0056_auto_20200811_1611.py b/chrono/agendas/migrations/0056_auto_20200811_1611.py
index 9616fed..d92cab2 100644
--- a/chrono/agendas/migrations/0056_auto_20200811_1611.py
+++ b/chrono/agendas/migrations/0056_auto_20200811_1611.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-08-11 14:11
-from __future__ import unicode_literals
 
 import django.db.models.deletion
 from django.contrib.postgres.fields import JSONField
diff --git a/chrono/agendas/migrations/0057_auto_20200831_1634.py b/chrono/agendas/migrations/0057_auto_20200831_1634.py
index 0e0d598..34fb7df 100644
--- a/chrono/agendas/migrations/0057_auto_20200831_1634.py
+++ b/chrono/agendas/migrations/0057_auto_20200831_1634.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-08-31 14:34
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0058_timeperiodexception_external.py b/chrono/agendas/migrations/0058_timeperiodexception_external.py
index fb6beed..9f3a122 100644
--- a/chrono/agendas/migrations/0058_timeperiodexception_external.py
+++ b/chrono/agendas/migrations/0058_timeperiodexception_external.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-08-31 14:36
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0059_event_almost_full.py b/chrono/agendas/migrations/0059_event_almost_full.py
index 80e71be..dcf4cdc 100644
--- a/chrono/agendas/migrations/0059_event_almost_full.py
+++ b/chrono/agendas/migrations/0059_event_almost_full.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-09-03 08:40
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0060_auto_20200903_1041.py b/chrono/agendas/migrations/0060_auto_20200903_1041.py
index 98c5b12..e8450b0 100644
--- a/chrono/agendas/migrations/0060_auto_20200903_1041.py
+++ b/chrono/agendas/migrations/0060_auto_20200903_1041.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-09-03 08:41
-from __future__ import unicode_literals
 
 import django.contrib.postgres.fields
 import django.db.models.deletion
diff --git a/chrono/agendas/migrations/0061_auto_20200909_1752.py b/chrono/agendas/migrations/0061_auto_20200909_1752.py
index 703b177..1ca7ac4 100644
--- a/chrono/agendas/migrations/0061_auto_20200909_1752.py
+++ b/chrono/agendas/migrations/0061_auto_20200909_1752.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-09-09 15:52
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0062_auto_20200915_1401.py b/chrono/agendas/migrations/0062_auto_20200915_1401.py
index 187404d..821e50c 100644
--- a/chrono/agendas/migrations/0062_auto_20200915_1401.py
+++ b/chrono/agendas/migrations/0062_auto_20200915_1401.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-09-15 12:01
-from __future__ import unicode_literals
 
 import django.db.models.deletion
 from django.db import migrations, models
diff --git a/chrono/agendas/migrations/0063_auto_20200928_1445.py b/chrono/agendas/migrations/0063_auto_20200928_1445.py
index da65a3b..df3cef1 100644
--- a/chrono/agendas/migrations/0063_auto_20200928_1445.py
+++ b/chrono/agendas/migrations/0063_auto_20200928_1445.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-09-28 12:45
-from __future__ import unicode_literals
 
 import django.core.validators
 from django.db import migrations, models
diff --git a/chrono/agendas/migrations/0064_booking_form_url.py b/chrono/agendas/migrations/0064_booking_form_url.py
index ed23203..fe5d4eb 100644
--- a/chrono/agendas/migrations/0064_booking_form_url.py
+++ b/chrono/agendas/migrations/0064_booking_form_url.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 import chrono.agendas.models
diff --git a/chrono/agendas/migrations/0065_unavailability_calendar.py b/chrono/agendas/migrations/0065_unavailability_calendar.py
index 16fc0b6..ab7071e 100644
--- a/chrono/agendas/migrations/0065_unavailability_calendar.py
+++ b/chrono/agendas/migrations/0065_unavailability_calendar.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-10-05 12:37
-from __future__ import unicode_literals
 
 import django.db.models.deletion
 from django.db import migrations, models
diff --git a/chrono/agendas/migrations/0066_timeperiodexceptionsource_unique_settings_slug.py b/chrono/agendas/migrations/0066_timeperiodexceptionsource_unique_settings_slug.py
index 18d216d..d17a701 100644
--- a/chrono/agendas/migrations/0066_timeperiodexceptionsource_unique_settings_slug.py
+++ b/chrono/agendas/migrations/0066_timeperiodexceptionsource_unique_settings_slug.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-10-21 11:56
-from __future__ import unicode_literals
 
 from django.db import migrations
 from django.db.models import Count, F
diff --git a/chrono/agendas/migrations/0067_auto_20201021_1746.py b/chrono/agendas/migrations/0067_auto_20201021_1746.py
index be8a070..dc3e6d0 100644
--- a/chrono/agendas/migrations/0067_auto_20201021_1746.py
+++ b/chrono/agendas/migrations/0067_auto_20201021_1746.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-10-21 15:46
-from __future__ import unicode_literals
 
 from django.db import migrations
 
@@ -14,6 +12,6 @@ class Migration(migrations.Migration):
     operations = [
         migrations.AlterUniqueTogether(
             name='timeperiodexceptionsource',
-            unique_together=set([('desk', 'settings_slug')]),
+            unique_together={('desk', 'settings_slug')},
         ),
     ]
diff --git a/chrono/agendas/migrations/0068_remove_timeperiodexception_external.py b/chrono/agendas/migrations/0068_remove_timeperiodexception_external.py
index d23686d..9d1fb85 100644
--- a/chrono/agendas/migrations/0068_remove_timeperiodexception_external.py
+++ b/chrono/agendas/migrations/0068_remove_timeperiodexception_external.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-10-27 09:32
-from __future__ import unicode_literals
 
 from django.db import migrations
 
diff --git a/chrono/agendas/migrations/0069_translate_holidays.py b/chrono/agendas/migrations/0069_translate_holidays.py
index e3c7743..6584745 100644
--- a/chrono/agendas/migrations/0069_translate_holidays.py
+++ b/chrono/agendas/migrations/0069_translate_holidays.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2020-10-29 15:39
-from __future__ import unicode_literals
 
 from django.conf import settings
 from django.db import migrations
diff --git a/chrono/agendas/migrations/0070_auto_20201202_1834.py b/chrono/agendas/migrations/0070_auto_20201202_1834.py
index db6b613..99eb88d 100644
--- a/chrono/agendas/migrations/0070_auto_20201202_1834.py
+++ b/chrono/agendas/migrations/0070_auto_20201202_1834.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.29 on 2020-12-02 17:34
-from __future__ import unicode_literals
 
 import django.db.models.deletion
 from django.db import migrations, models
@@ -47,6 +45,6 @@ class Migration(migrations.Migration):
         ),
         migrations.AlterUniqueTogether(
             name='bookingcolor',
-            unique_together=set([('agenda', 'label')]),
+            unique_together={('agenda', 'label')},
         ),
     ]
diff --git a/chrono/agendas/migrations/0071_booking_attendance.py b/chrono/agendas/migrations/0071_booking_attendance.py
index 6b79a4f..0faecc4 100644
--- a/chrono/agendas/migrations/0071_booking_attendance.py
+++ b/chrono/agendas/migrations/0071_booking_attendance.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0072_booking_absence_reason.py b/chrono/agendas/migrations/0072_booking_absence_reason.py
index 4b0c8bd..b294ae1 100644
--- a/chrono/agendas/migrations/0072_booking_absence_reason.py
+++ b/chrono/agendas/migrations/0072_booking_absence_reason.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0073_auto_20210125_1800.py b/chrono/agendas/migrations/0073_auto_20210125_1800.py
index b473ce6..1115406 100644
--- a/chrono/agendas/migrations/0073_auto_20210125_1800.py
+++ b/chrono/agendas/migrations/0073_auto_20210125_1800.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2021-01-25 17:00
-from __future__ import unicode_literals
 
 from django.db import migrations
 
@@ -23,7 +21,7 @@ class Migration(migrations.Migration):
         migrations.RunPython(booking_color_unique_label, migrations.RunPython.noop),
         migrations.AlterUniqueTogether(
             name='bookingcolor',
-            unique_together=set([('label',)]),
+            unique_together={('label',)},
         ),
         migrations.RemoveField(
             model_name='bookingcolor',
diff --git a/chrono/agendas/migrations/0074_simple_desks.py b/chrono/agendas/migrations/0074_simple_desks.py
index 2854dfd..6a76df8 100644
--- a/chrono/agendas/migrations/0074_simple_desks.py
+++ b/chrono/agendas/migrations/0074_simple_desks.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations, models
 
 
diff --git a/chrono/agendas/migrations/0075_auto_20210216_1553.py b/chrono/agendas/migrations/0075_auto_20210216_1553.py
index 04bcd22..e48f2ac 100644
--- a/chrono/agendas/migrations/0075_auto_20210216_1553.py
+++ b/chrono/agendas/migrations/0075_auto_20210216_1553.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2021-02-16 14:53
-from __future__ import unicode_literals
 
 import django.db.models.deletion
 from django.contrib.postgres.fields import JSONField
diff --git a/chrono/agendas/migrations/0076_event_recurrence_end_date.py b/chrono/agendas/migrations/0076_event_recurrence_end_date.py
index 3ff05bf..67d9ea5 100644
--- a/chrono/agendas/migrations/0076_event_recurrence_end_date.py
+++ b/chrono/agendas/migrations/0076_event_recurrence_end_date.py
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2021-02-16 15:10
-from __future__ import unicode_literals
 
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0077_meetings_default_view.py b/chrono/agendas/migrations/0077_meetings_default_view.py
index 6237bcc..d1a37e9 100644
--- a/chrono/agendas/migrations/0077_meetings_default_view.py
+++ b/chrono/agendas/migrations/0077_meetings_default_view.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 from django.db import migrations
 
 
diff --git a/chrono/agendas/migrations/0078_absence_reasons.py b/chrono/agendas/migrations/0078_absence_reasons.py
index 32d1040..1e0b04c 100644
--- a/chrono/agendas/migrations/0078_absence_reasons.py
+++ b/chrono/agendas/migrations/0078_absence_reasons.py
@@ -1,6 +1,3 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
 import django.db.models.deletion
 from django.db import migrations, models
 
diff --git a/chrono/agendas/migrations/0080_create_exceptions_desks.py b/chrono/agendas/migrations/0080_create_exceptions_desks.py
index fb377a7..fa3ac50 100644
--- a/chrono/agendas/migrations/0080_create_exceptions_desks.py
+++ b/chrono/agendas/migrations/0080_create_exceptions_desks.py
@@ -1,7 +1,5 @@
-# -*- coding: utf-8 -*-
 # Generated by Django 1.11.18 on 2021-01-27 16:46
 
-from __future__ import unicode_literals
 
 from django.db import migrations
 
diff --git a/chrono/agendas/models.py b/chrono/agendas/models.py
index a0a83f9..672bc6b 100644
--- a/chrono/agendas/models.py
+++ b/chrono/agendas/models.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
 # chrono - agendas system
 # Copyright (C) 2016  Entr'ouvert
 #
@@ -991,9 +990,9 @@ class VirtualMember(models.Model):
         virtual_meetingtypes = self.virtual_agenda.iter_meetingtypes(excluded_agenda=self.real_agenda)
         if not virtual_meetingtypes:
             return
-        virtual_meetingtypes = set([(mt.label, mt.slug, mt.duration) for mt in virtual_meetingtypes])
+        virtual_meetingtypes = {(mt.label, mt.slug, mt.duration) for mt in virtual_meetingtypes}
         real_meetingtypes = self.real_agenda.iter_meetingtypes()
-        real_meetingtypes = set([(mt.label, mt.slug, mt.duration) for mt in real_meetingtypes])
+        real_meetingtypes = {(mt.label, mt.slug, mt.duration) for mt in real_meetingtypes}
         if virtual_meetingtypes - real_meetingtypes:
             # missing meeting type in real agenda
             for mt in virtual_meetingtypes - real_meetingtypes:
@@ -1038,7 +1037,7 @@ class TimePeriod(models.Model):
         ordering = ['weekday', 'start_time']
 
     def __str__(self):
-        return u'%s / %s → %s' % (
+        return '%s / %s → %s' % (
             force_text(WEEKDAYS[self.weekday]),
             date_format(self.start_time, 'TIME_FORMAT'),
             date_format(self.end_time, 'TIME_FORMAT'),
@@ -1123,7 +1122,7 @@ class SharedTimePeriod:
         self.desks = set(desks)
 
     def __str__(self):
-        return u'%s / %s → %s' % (
+        return '%s / %s → %s' % (
             force_text(WEEKDAYS[self.weekday]),
             date_format(self.start_time, 'TIME_FORMAT'),
             date_format(self.end_time, 'TIME_FORMAT'),
@@ -2118,7 +2117,7 @@ class Category(models.Model):
 
 
 def ics_directory_path(instance, filename):
-    return 'ics/{0}/{1}'.format(str(uuid.uuid4()), filename)
+    return f'ics/{str(uuid.uuid4())}/{filename}'
 
 
 class TimePeriodExceptionSource(models.Model):
@@ -2462,27 +2461,27 @@ class TimePeriodException(models.Model):
             # if both dates are at midnight don't include the time part
             if self.end_datetime == self.start_datetime + datetime.timedelta(days=1):
                 # a single day
-                exc_repr = u'%s' % date_format(localtime(self.start_datetime), 'SHORT_DATE_FORMAT')
+                exc_repr = '%s' % date_format(localtime(self.start_datetime), 'SHORT_DATE_FORMAT')
             else:
-                exc_repr = u'%s → %s' % (
+                exc_repr = '%s → %s' % (
                     date_format(localtime(self.start_datetime), 'SHORT_DATE_FORMAT'),
                     date_format(localtime(self.end_datetime), 'SHORT_DATE_FORMAT'),
                 )
         else:
             if localtime(self.start_datetime).date() == localtime(self.end_datetime).date():
                 # same day
-                exc_repr = u'%s → %s' % (
+                exc_repr = '%s → %s' % (
                     date_format(localtime(self.start_datetime), 'SHORT_DATETIME_FORMAT'),
                     date_format(localtime(self.end_datetime), 'TIME_FORMAT'),
                 )
             else:
-                exc_repr = u'%s → %s' % (
+                exc_repr = '%s → %s' % (
                     date_format(localtime(self.start_datetime), 'SHORT_DATETIME_FORMAT'),
                     date_format(localtime(self.end_datetime), 'SHORT_DATETIME_FORMAT'),
                 )
 
         if self.label:
-            exc_repr = u'%s (%s)' % (self.label, exc_repr)
+            exc_repr = '%s (%s)' % (self.label, exc_repr)
 
         return exc_repr
 
diff --git a/chrono/api/utils.py b/chrono/api/utils.py
index 89afd7b..37fde6f 100644
--- a/chrono/api/utils.py
+++ b/chrono/api/utils.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
 # chrono - agendas system
 # Copyright (C) 2019  Entr'ouvert
 #
diff --git a/chrono/api/views.py b/chrono/api/views.py
index 7c5c45d..17f1186 100644
--- a/chrono/api/views.py
+++ b/chrono/api/views.py
@@ -256,8 +256,8 @@ def get_all_slots(
     user_bookings = IntervalSet()
     if user_external_id:
         used_min_datetime, used_max_datetime = (
-            min([v[0] for v in agenda_id_min_max_datetime.values()]),
-            max([v[1] for v in agenda_id_min_max_datetime.values()]),
+            min(v[0] for v in agenda_id_min_max_datetime.values()),
+            max(v[1] for v in agenda_id_min_max_datetime.values()),
         )
         booked_events = (
             Event.objects.filter(
@@ -558,7 +558,7 @@ def get_resources_from_request(request, agenda):
     resources_slugs = [s for s in request.GET['resources'].split(',') if s]
     resources = list(agenda.resources.filter(slug__in=resources_slugs))
     if len(resources) != len(resources_slugs):
-        unknown_slugs = set(resources_slugs) - set([r.slug for r in resources])
+        unknown_slugs = set(resources_slugs) - {r.slug for r in resources}
         unknown_slugs = sorted(list(unknown_slugs))
         raise APIError(
             _('invalid resource: %s') % ', '.join(unknown_slugs),
@@ -2027,8 +2027,8 @@ class ResizeBooking(APIView):
                 'err_desc': _('secondary booking'),
             }
             return Response(response)
-        event_ids = set([event.pk])
-        in_waiting_list = set([booking.in_waiting_list])
+        event_ids = {event.pk}
+        in_waiting_list = {booking.in_waiting_list}
         secondary_bookings = booking.secondary_booking_set.all().order_by('-creation_datetime')
         for secondary in secondary_bookings:
             event_ids.add(secondary.event_id)
diff --git a/chrono/manager/forms.py b/chrono/manager/forms.py
index 08bb4f9..cf10611 100644
--- a/chrono/manager/forms.py
+++ b/chrono/manager/forms.py
@@ -14,7 +14,6 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from __future__ import unicode_literals
 
 import collections
 import csv
diff --git a/chrono/manager/management/commands/import_site.py b/chrono/manager/management/commands/import_site.py
index 9986604..6c38b72 100644
--- a/chrono/manager/management/commands/import_site.py
+++ b/chrono/manager/management/commands/import_site.py
@@ -44,7 +44,7 @@ class Command(BaseCommand):
                     overwrite=options['overwrite'],
                 )
             except AgendaImportError as exc:
-                raise CommandError(u'%s' % exc)
+                raise CommandError('%s' % exc)
 
         if filename == '-':
             fd = sys.stdin
diff --git a/chrono/manager/views.py b/chrono/manager/views.py
index ff8210f..50ef9ca 100644
--- a/chrono/manager/views.py
+++ b/chrono/manager/views.py
@@ -296,8 +296,8 @@ class ResourceDayView(DateMixin, DayArchiveView):
             x for x in self.object_list if any([y.cancellation_datetime is None for y in x.booking_set.all()])
         ]
         if active_events:
-            min_event = min([localtime(x.start_datetime).time() for x in active_events])
-            max_event = max([localtime(x.start_datetime + interval).time() for x in active_events])
+            min_event = min(localtime(x.start_datetime).time() for x in active_events)
+            max_event = max(localtime(x.start_datetime + interval).time() for x in active_events)
         if min_timeperiod is None and min_event is None:
             return
         min_display = min(min_timeperiod or datetime.time(23), min_event or datetime.time(23))
@@ -396,8 +396,8 @@ class ResourceMonthView(DateMixin, MonthArchiveView):
             x for x in self.object_list if any([y.cancellation_datetime is None for y in x.booking_set.all()])
         ]
         if active_events:
-            min_event = min([localtime(x.start_datetime).time() for x in active_events])
-            max_event = max([localtime(x.start_datetime + interval).time() for x in active_events])
+            min_event = min(localtime(x.start_datetime).time() for x in active_events)
+            max_event = max(localtime(x.start_datetime + interval).time() for x in active_events)
             hide_sunday_event = not any([x.start_datetime.weekday() == 6 for x in active_events])
             hide_weekend_event = hide_sunday_event and not any(
                 [x.start_datetime.weekday() == 5 for x in active_events]
@@ -807,7 +807,7 @@ class AgendasImportView(FormView):
         try:
             results = import_site(agendas_json, overwrite=False)
         except AgendaImportError as exc:
-            form.add_error('agendas_json', u'%s' % exc)
+            form.add_error('agendas_json', '%s' % exc)
             return self.form_invalid(form)
         except KeyError as exc:
             form.add_error('agendas_json', _('Key "%s" is missing.') % exc.args[0])
@@ -885,7 +885,7 @@ class AgendasImportView(FormView):
                 else:
                     message2 = message_update
 
-                messages.info(self.request, u'%s %s' % (message1, message2))
+                messages.info(self.request, '%s %s' % (message1, message2))
 
         if global_noop:
             messages.info(self.request, _('No data found.'))
@@ -1165,7 +1165,7 @@ class AgendaDayView(AgendaDateView, DayArchiveView):
         )
 
     def get_timetable_infos(self):
-        timeperiods = itertools.chain(*[d.timeperiod_set.all() for d in self.agenda.prefetched_desks])
+        timeperiods = itertools.chain(*(d.timeperiod_set.all() for d in self.agenda.prefetched_desks))
         timeperiods = [t for t in timeperiods if t.weekday == self.date.weekday()]
         timeperiods = sorted(timeperiods, key=lambda t: t.start_time)
 
@@ -1173,14 +1173,14 @@ class AgendaDayView(AgendaDateView, DayArchiveView):
 
         min_timeperiod = max_timeperiod = min_event = max_event = None
         if timeperiods:
-            min_timeperiod = min([x.start_time for x in timeperiods])
-            max_timeperiod = max([x.end_time for x in timeperiods])
+            min_timeperiod = min(x.start_time for x in timeperiods)
+            max_timeperiod = max(x.end_time for x in timeperiods)
         active_events = [
             x for x in self.object_list if any([y.cancellation_datetime is None for y in x.booking_set.all()])
         ]
         if active_events:
-            min_event = min([localtime(x.start_datetime).time() for x in active_events])
-            max_event = max([localtime(x.start_datetime + interval).time() for x in active_events])
+            min_event = min(localtime(x.start_datetime).time() for x in active_events)
+            max_event = max(localtime(x.start_datetime + interval).time() for x in active_events)
         if min_timeperiod is None and min_event is None:
             return
         min_display = min(min_timeperiod or datetime.time(23), min_event or datetime.time(23))
@@ -1305,7 +1305,7 @@ class AgendaMonthView(AgendaDateView, MonthArchiveView):
         return '1'
 
     def get_timetable_infos(self):
-        timeperiods = itertools.chain(*[d.timeperiod_set.all() for d in self.agenda.prefetched_desks])
+        timeperiods = itertools.chain(*(d.timeperiod_set.all() for d in self.agenda.prefetched_desks))
         timeperiods = sorted(timeperiods, key=lambda t: (t.weekday, t.start_time))
 
         interval = datetime.timedelta(minutes=60)
@@ -1313,8 +1313,8 @@ class AgendaMonthView(AgendaDateView, MonthArchiveView):
         min_timeperiod = max_timeperiod = min_event = max_event = None
         hide_sunday_timeperiod = hide_weekend_timeperiod = hide_sunday_event = hide_weekend_event = True
         if timeperiods:
-            min_timeperiod = min([x.start_time for x in timeperiods])
-            max_timeperiod = max([x.end_time for x in timeperiods])
+            min_timeperiod = min(x.start_time for x in timeperiods)
+            max_timeperiod = max(x.end_time for x in timeperiods)
             hide_sunday_timeperiod = not any([e.weekday == 6 for e in timeperiods])
             hide_weekend_timeperiod = hide_sunday_timeperiod and not any(
                 [e.weekday == 5 for e in timeperiods]
@@ -1323,8 +1323,8 @@ class AgendaMonthView(AgendaDateView, MonthArchiveView):
             x for x in self.object_list if any([y.cancellation_datetime is None for y in x.booking_set.all()])
         ]
         if active_events:
-            min_event = min([localtime(x.start_datetime).time() for x in active_events])
-            max_event = max([localtime(x.start_datetime + interval).time() for x in active_events])
+            min_event = min(localtime(x.start_datetime).time() for x in active_events)
+            max_event = max(localtime(x.start_datetime + interval).time() for x in active_events)
             hide_sunday_event = not any([x.start_datetime.weekday() == 6 for x in active_events])
             hide_weekend_event = hide_sunday_event and not any(
                 [x.start_datetime.weekday() == 5 for x in active_events]
@@ -2554,7 +2554,7 @@ class TimePeriodExceptionDeleteView(ManagedTimePeriodExceptionMixin, DeleteView)
 
         success_url = super().get_success_url()
         if self.desk and 'from_popup' in self.request.GET:
-            success_url = '{}?display_exceptions={}'.format(success_url, self.desk.pk)
+            success_url = f'{success_url}?display_exceptions={self.desk.pk}'
         return success_url
 
     def get_queryset(self):
diff --git a/chrono/utils/spooler.py b/chrono/utils/spooler.py
index 161d6ab..77176a2 100644
--- a/chrono/utils/spooler.py
+++ b/chrono/utils/spooler.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
 # chrono - agendas system
 # Copyright (C) 2021  Entr'ouvert
 #
diff --git a/setup.py b/setup.py
index b2750cc..487b96a 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,4 @@
 #! /usr/bin/env python
-# -*- coding: utf-8 -*-
 
 import glob
 import os
@@ -34,7 +33,7 @@ def get_version():
     tag exists, take 0.0- and add the length of the commit log.
     """
     if os.path.exists('VERSION'):
-        with open('VERSION', 'r') as v:
+        with open('VERSION') as v:
             return v.read()
     if os.path.exists('.git'):
         p = subprocess.Popen(
diff --git a/tests/api/conftest.py b/tests/api/conftest.py
index f222d45..7360ad8 100644
--- a/tests/api/conftest.py
+++ b/tests/api/conftest.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import datetime
 
 import pytest
@@ -13,7 +11,7 @@ from chrono.agendas.models import Agenda, Desk, Event, MeetingType, TimePeriod,
 def user():
     User = get_user_model()
     user = User.objects.create(
-        username='john.doe', first_name=u'John', last_name=u'Doe', email='john.doe@example.net'
+        username='john.doe', first_name='John', last_name='Doe', email='john.doe@example.net'
     )
     user.set_password('password')
     user.save()
@@ -41,7 +39,7 @@ def mock_now(request, freezer, time_zone):
 
 @pytest.fixture
 def some_data(mock_now):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     first_date = localtime(now()).replace(hour=17, minute=0, second=0, microsecond=0)
     first_date += datetime.timedelta(days=1)
@@ -49,7 +47,7 @@ def some_data(mock_now):
         event = Event(start_datetime=first_date + datetime.timedelta(days=i), places=20, agenda=agenda)
         event.save()
 
-    agenda2 = Agenda(label=u'Foo bar 2')
+    agenda2 = Agenda(label='Foo bar 2')
     agenda2.save()
     first_date = localtime(now()).replace(hour=20, minute=0, second=0, microsecond=0)
     first_date += datetime.timedelta(days=1)
@@ -65,7 +63,7 @@ def some_data(mock_now):
 @pytest.fixture
 def meetings_agenda(mock_now):
     agenda = Agenda(
-        label=u'Foo bar Meeting', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=56
+        label='Foo bar Meeting', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=56
     )
     agenda.save()
     meeting_type = MeetingType(agenda=agenda, label='Blah', duration=30)
diff --git a/tests/api/test_all.py b/tests/api/test_all.py
index e58ab58..340a4bb 100644
--- a/tests/api/test_all.py
+++ b/tests/api/test_all.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import datetime
 
 import pytest
@@ -271,7 +269,7 @@ def test_agendas_meetingtypes_api(app, some_data, meetings_agenda):
     assert resp.json == expected_resp
 
     # wrong kind
-    agenda1 = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda1 = Agenda.objects.filter(label='Foo bar')[0]
     resp = app.get('/api/agenda/%s/meetings/' % agenda1.slug, status=404)
 
     # unknown
@@ -434,7 +432,7 @@ def test_agenda_detail_routing(app, meetings_agenda):
 
     # check it doesn't get confused with an agenda with "agenda" in its slug
     agenda = Agenda(
-        label=u'Foo bar Agenda', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=56
+        label='Foo bar Agenda', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=56
     )
     agenda.save()
     api_url = '/api/agenda/%s/' % agenda.slug
@@ -462,14 +460,14 @@ def test_virtual_agenda_detail(app, virtual_meetings_agenda):
 
 
 def test_virtual_agendas_meetingtypes_api(app):
-    virt_agenda = Agenda.objects.create(label=u'Virtual agenda', kind='virtual')
+    virt_agenda = Agenda.objects.create(label='Virtual agenda', kind='virtual')
 
     # No meetings because no real agenda
     resp = app.get('/api/agenda/%s/meetings/' % virt_agenda.slug)
     assert resp.json == {'data': []}
 
     # One real agenda : every meetings exposed
-    foo_agenda = Agenda.objects.create(label=u'Foo', kind='meetings')
+    foo_agenda = Agenda.objects.create(label='Foo', kind='meetings')
     MeetingType.objects.create(agenda=foo_agenda, label='Meeting1', duration=30)
     MeetingType.objects.create(agenda=foo_agenda, label='Meeting2', duration=15)
     VirtualMember.objects.create(virtual_agenda=virt_agenda, real_agenda=foo_agenda)
@@ -497,7 +495,7 @@ def test_virtual_agendas_meetingtypes_api(app):
 
     # Several real agendas
 
-    bar_agenda = Agenda.objects.create(label=u'Bar', kind='meetings')
+    bar_agenda = Agenda.objects.create(label='Bar', kind='meetings')
     MeetingType.objects.create(agenda=bar_agenda, label='Meeting Bar', duration=30)
     VirtualMember.objects.create(virtual_agenda=virt_agenda, real_agenda=bar_agenda)
 
diff --git a/tests/api/test_booking.py b/tests/api/test_booking.py
index bdc27a6..8054786 100644
--- a/tests/api/test_booking.py
+++ b/tests/api/test_booking.py
@@ -1,9 +1,7 @@
-# -*- coding: utf-8 -*-
-
 import datetime
 import urllib.parse as urlparse
+from unittest import mock
 
-import mock
 import pytest
 from django.utils.timezone import make_aware, now
 
@@ -21,7 +19,7 @@ pytestmark = pytest.mark.django_db
 
 
 def test_booking_ics(app, some_data, meetings_agenda, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     event = [x for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()][0]
     app.authorization = ('Basic', ('john.doe', 'password'))
     resp = app.post('/api/agenda/%s/fillslot/%s/' % (agenda.slug, event.id))
@@ -114,7 +112,7 @@ def test_booking_ics(app, some_data, meetings_agenda, user):
     assert 'COMMENT:custom comment\r\n' in resp.text
     assert 'URL:http://example.com/custom\r\n' in resp.text
 
-    meetings_agenda_id = Agenda.objects.filter(label=u'Foo bar Meeting')[0].id
+    meetings_agenda_id = Agenda.objects.filter(label='Foo bar Meeting')[0].id
     meeting_type = MeetingType.objects.get(agenda=meetings_agenda)
     resp = app.get('/api/agenda/meetings/%s/datetimes/' % meeting_type.id)
     event = resp.json['data'][2]
@@ -606,7 +604,7 @@ def test_booking_patch_api_extra_data(app, user):
 
 
 def test_booking_cancellation_api(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     event = [x for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()][0]
     resp = app.post('/api/agenda/%s/fillslot/%s/' % (agenda.id, event.id), status=401)
 
@@ -619,7 +617,7 @@ def test_booking_cancellation_api(app, some_data, user):
 
 
 def test_booking_cancellation_post_api(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     event = [x for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()][0]
     resp = app.post('/api/agenda/%s/fillslot/%s/' % (agenda.id, event.id), status=401)
 
@@ -647,7 +645,7 @@ def test_booking_cancellation_post_api(app, some_data, user):
 
 
 def test_booking_cancellation_post_meeting_api(app, meetings_agenda, user):
-    agenda_id = Agenda.objects.filter(label=u'Foo bar Meeting')[0].id
+    agenda_id = Agenda.objects.filter(label='Foo bar Meeting')[0].id
     meeting_type = MeetingType.objects.get(agenda=meetings_agenda)
     resp = app.get('/api/agenda/meetings/%s/datetimes/' % meeting_type.id)
     nb_events = len(resp.json['data'])
@@ -760,7 +758,7 @@ def test_bookings(app, user):
 
 
 def test_cancel_booking(app, some_data, user):
-    agenda_id = Agenda.objects.filter(label=u'Foo bar')[0].pk
+    agenda_id = Agenda.objects.filter(label='Foo bar')[0].pk
     event = Event.objects.filter(agenda_id=agenda_id).exclude(start_datetime__lt=now())[0]
     primary = Booking.objects.create(event=event)
     secondary = Booking.objects.create(event=event, primary_booking=primary)
diff --git a/tests/api/test_datetimes.py b/tests/api/test_datetimes.py
index 296d5ca..0053e6d 100644
--- a/tests/api/test_datetimes.py
+++ b/tests/api/test_datetimes.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import datetime
 import urllib.parse as urlparse
 
@@ -13,7 +11,7 @@ pytestmark = pytest.mark.django_db
 
 
 def test_datetimes_api(app, some_data):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
 
     def check_bookability(data):
         for event in data:
@@ -79,7 +77,7 @@ def test_datetime_api_fr(app):
     agenda = Agenda.objects.create(label='Foo bar', kind='events', minimal_booking_delay=0)
     Event.objects.create(
         slug='event-slug',
-        start_datetime=localtime((now() + datetime.timedelta(days=5))).replace(hour=17, minute=0),
+        start_datetime=localtime(now() + datetime.timedelta(days=5)).replace(hour=17, minute=0),
         places=5,
         agenda=agenda,
     )
@@ -339,7 +337,7 @@ def test_datetimes_api_hide_disabled(app):
 
 
 def test_waiting_list_datetimes(app, some_data, user):
-    agenda_id = Agenda.objects.filter(label=u'Foo bar')[0].id
+    agenda_id = Agenda.objects.filter(label='Foo bar')[0].id
     event = Event.objects.filter(agenda_id=agenda_id).exclude(start_datetime__lt=now())[0]
     event.waiting_list_places = 5
     event.save()
@@ -489,7 +487,7 @@ def test_datetimes_api_meta(app, freezer):
     # 2017-05-20 -> saturday
     freezer.move_to(make_aware(datetime.datetime(year=2017, month=5, day=20, hour=1, minute=12)))
 
-    agenda = Agenda.objects.create(label=u'Foo bar')
+    agenda = Agenda.objects.create(label='Foo bar')
     first_date = localtime(now()).replace(hour=17, minute=0, second=0, microsecond=0)
     first_date += datetime.timedelta(days=1)
     for i in range(3):
diff --git a/tests/api/test_event.py b/tests/api/test_event.py
index f290b2c..be02efb 100644
--- a/tests/api/test_event.py
+++ b/tests/api/test_event.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import datetime
 
 import pytest
diff --git a/tests/api/test_fillslot.py b/tests/api/test_fillslot.py
index 7acca28..8052218 100644
--- a/tests/api/test_fillslot.py
+++ b/tests/api/test_fillslot.py
@@ -1,9 +1,7 @@
-# -*- coding: utf-8 -*-
-
 import datetime
 import urllib.parse as urlparse
+from unittest import mock
 
-import mock
 import pytest
 from django.db import connection
 from django.test.utils import CaptureQueriesContext
@@ -25,7 +23,7 @@ pytestmark = pytest.mark.django_db
 
 
 def test_booking_api(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     event = [x for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()][0]
 
     # unauthenticated
@@ -269,7 +267,7 @@ def test_booking_api_meetings_agenda_exclude_slots(app, user):
 
 
 def test_booking_api_fillslots(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     events_ids = [x.id for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()]
     events_slugs = [x.slug for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()]
     assert len(events_ids) == 3
@@ -411,7 +409,7 @@ def test_booking_api_fillslots(app, some_data, user):
 
 
 def test_booking_api_fillslots_slots_string_param(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     events_ids = [x.id for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()]
     assert len(events_ids) == 3
     app.authorization = ('Basic', ('john.doe', 'password'))
@@ -761,7 +759,7 @@ def test_booking_api_meeting_across_daylight_saving_time(app, meetings_agenda, u
 
 
 def test_booking_api_with_data(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     event = [x for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()][0]
 
     app.authorization = ('Basic', ('john.doe', 'password'))
@@ -855,7 +853,7 @@ def test_booking_api_available(app, user):
 
 
 def test_booking_api_force_waiting_list(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     event = [x for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()][0]
 
     app.authorization = ('Basic', ('john.doe', 'password'))
@@ -935,7 +933,7 @@ def test_booking_api_force_waiting_list(app, some_data, user):
 
 
 def test_booking_api_with_cancel_booking(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     event_0, event_1, event_2 = [x for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()][
         0:4
     ]
@@ -1017,7 +1015,7 @@ def test_booking_api_with_cancel_booking(app, some_data, user):
 
 
 def test_soldout(app, some_data, user):
-    agenda_id = Agenda.objects.filter(label=u'Foo bar')[0].id
+    agenda_id = Agenda.objects.filter(label='Foo bar')[0].id
     event = Event.objects.filter(agenda_id=agenda_id).exclude(start_datetime__lt=now())[0]
 
     resp = app.get('/api/agenda/%s/datetimes/' % agenda_id)
@@ -1041,7 +1039,7 @@ def test_soldout(app, some_data, user):
 
 
 def test_waiting_list_booking(app, some_data, user):
-    agenda_id = Agenda.objects.filter(label=u'Foo bar')[0].id
+    agenda_id = Agenda.objects.filter(label='Foo bar')[0].id
     event = Event.objects.filter(agenda_id=agenda_id).exclude(start_datetime__lt=now())[0]
     event.waiting_list_places = 5
     event.save()
@@ -1084,7 +1082,7 @@ def test_waiting_list_booking(app, some_data, user):
 
 
 def test_multiple_booking_api(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     event = [x for x in Event.objects.filter(agenda=agenda) if x.in_bookable_period()][0]
 
     app.authorization = ('Basic', ('john.doe', 'password'))
@@ -1174,7 +1172,7 @@ def test_multiple_booking_api(app, some_data, user):
 
 
 def test_multiple_booking_api_fillslots(app, some_data, user):
-    agenda = Agenda.objects.filter(label=u'Foo bar')[0]
+    agenda = Agenda.objects.filter(label='Foo bar')[0]
     # get slots of first 2 events
     events = [
         x for x in Event.objects.filter(agenda=agenda).order_by('start_datetime') if x.in_bookable_period()
@@ -1287,7 +1285,7 @@ def test_multiple_booking_api_fillslots(app, some_data, user):
 
 
 def test_multiple_booking_move_booking(app, user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     first_date = localtime(now()).replace(hour=17, minute=0, second=0, microsecond=0)
     first_date += datetime.timedelta(days=1)
@@ -1623,7 +1621,7 @@ def test_virtual_agendas_meetings_booking(app, mock_now, user):
         == resp.json['data'][0]['datetime']
     )
     second_booking_agenda = resp_booking.json['agenda']['slug']
-    assert set([first_booking_agenda, second_booking_agenda]) == {'foo-meeting', 'bar-meeting'}
+    assert {first_booking_agenda, second_booking_agenda} == {'foo-meeting', 'bar-meeting'}
 
     # try booking the same timeslot a third time: full
     resp_booking = app.post(fillslot_url)
@@ -1794,7 +1792,7 @@ def test_virtual_agendas_meetings_booking_default_policy(app, mock_now, user):
 
 @pytest.mark.freeze_time('2017-04-01')
 def test_duration_on_booking_api_fillslot_response(app, user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     first_date = datetime.datetime(2017, 5, 20, 1, 12)
     durations = [None, 0, 45]
@@ -1842,7 +1840,7 @@ def test_duration_on_booking_api_fillslot_response(app, user):
 
 @pytest.mark.freeze_time('2017-04-01')
 def test_duration_on_booking_api_fillslots_response(app, user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     first_date = datetime.datetime(2017, 5, 20, 1, 12)
     durations = [None, 0, 45]
diff --git a/tests/api/test_meetings_datetimes.py b/tests/api/test_meetings_datetimes.py
index 5f69bf7..bcde151 100644
--- a/tests/api/test_meetings_datetimes.py
+++ b/tests/api/test_meetings_datetimes.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import datetime
 
 import pytest
@@ -884,7 +882,7 @@ def test_agenda_meeting_api_desk_info(app, meetings_agenda, user):
 @pytest.mark.freeze_time('2017-05-20')
 def test_agenda_meeting_gcd_durations(app, user):
     meetings_agenda = Agenda.objects.create(
-        label=u'Foo bar Meeting', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=8
+        label='Foo bar Meeting', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=8
     )
     meeting_type_30 = MeetingType.objects.create(agenda=meetings_agenda, label='Blah', duration=30)
     desk = Desk.objects.create(agenda=meetings_agenda, label='Desk 1')
@@ -955,7 +953,7 @@ def test_agenda_meeting_gcd_durations(app, user):
 @pytest.mark.freeze_time('2017-05-20')
 def test_agenda_meeting_gcd_durations_and_exceptions(app, user):
     meetings_agenda = Agenda.objects.create(
-        label=u'Foo bar Meeting', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=3
+        label='Foo bar Meeting', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=3
     )
     desk = Desk.objects.create(agenda=meetings_agenda, label='Desk 1')
     TimePeriod.objects.create(
@@ -1131,7 +1129,7 @@ def test_virtual_agendas_meetings_datetimes_api(app, virtual_meetings_agenda):
 
 def test_virtual_agendas_meetings_datetimes_api_with_similar_desk(app):
     agenda_foo = Agenda.objects.create(
-        label=u'Agenda Foo', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=4
+        label='Agenda Foo', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=4
     )
     MeetingType.objects.create(agenda=agenda_foo, label='Meeting Type', duration=30)
     test_1st_weekday = (localtime(now()).weekday() + 1) % 7
@@ -1159,7 +1157,7 @@ def test_virtual_agendas_meetings_datetimes_api_with_similar_desk(app):
     )
 
     agenda_bar = Agenda.objects.create(
-        label=u'Agenda Bar', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=4
+        label='Agenda Bar', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=4
     )
     meeting_type_bar = MeetingType.objects.create(agenda=agenda_bar, label='Meeting Type', duration=30)
     desk_bar = Desk.objects.create(agenda=agenda_bar, label='Desk 1')
@@ -1183,7 +1181,7 @@ def test_virtual_agendas_meetings_datetimes_api_with_similar_desk(app):
     )
 
     virtual_agenda = Agenda.objects.create(
-        label=u'Agenda Virtual', kind='virtual', minimal_booking_delay=1, maximal_booking_delay=4
+        label='Agenda Virtual', kind='virtual', minimal_booking_delay=1, maximal_booking_delay=4
     )
     VirtualMember.objects.create(virtual_agenda=virtual_agenda, real_agenda=agenda_foo)
     VirtualMember.objects.create(virtual_agenda=virtual_agenda, real_agenda=agenda_bar)
@@ -1884,7 +1882,7 @@ def test_datetimes_maximal_booking_delay(app, user, freezer, test_datetime):
 
 def test_meetings_and_virtual_datetimes_date_filter(app):
     agenda_foo = Agenda.objects.create(
-        label=u'Agenda Foo', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=7
+        label='Agenda Foo', kind='meetings', minimal_booking_delay=1, maximal_booking_delay=7
     )
     meeting_type = MeetingType.objects.create(agenda=agenda_foo, label='Meeting Type', duration=30)
     desk_foo = Desk.objects.create(agenda=agenda_foo, label='Desk 1')
@@ -1903,7 +1901,7 @@ def test_meetings_and_virtual_datetimes_date_filter(app):
         )
 
     virtual_agenda = Agenda.objects.create(
-        label=u'Agenda Virtual', kind='virtual', minimal_booking_delay=1, maximal_booking_delay=7
+        label='Agenda Virtual', kind='virtual', minimal_booking_delay=1, maximal_booking_delay=7
     )
     VirtualMember.objects.create(virtual_agenda=virtual_agenda, real_agenda=agenda_foo)
 
@@ -2034,9 +2032,7 @@ def test_meetings_and_virtual_datetimes_date_filter(app):
 def test_datetimes_api_meetings_agenda_meta(app, freezer):
     # 2017-05-20 -> saturday
     freezer.move_to(make_aware(datetime.datetime(year=2017, month=5, day=20, hour=1, minute=12)))
-    meetings_agenda = Agenda.objects.create(
-        label=u'Foo bar Meeting', kind='meetings', maximal_booking_delay=3
-    )
+    meetings_agenda = Agenda.objects.create(label='Foo bar Meeting', kind='meetings', maximal_booking_delay=3)
     meeting_type = MeetingType(agenda=meetings_agenda, label='Blah', duration=30)
     meeting_type.save()
 
@@ -2124,9 +2120,9 @@ def test_datetimes_api_meetings_agenda_meta(app, freezer):
 def test_datetimes_api_virtual_meetings_agenda_meta(app, freezer):
     # 2017-05-20 -> saturday
     freezer.move_to(make_aware(datetime.datetime(year=2017, month=5, day=20, hour=1, minute=12)))
-    meetings_agenda1 = Agenda.objects.create(label=u'Foo Meeting', kind='meetings', maximal_booking_delay=3)
-    meetings_agenda2 = Agenda.objects.create(label=u'Bar Meeting', kind='meetings', maximal_booking_delay=3)
-    virtual_agenda = Agenda.objects.create(label=u'Agenda Virtual', kind='virtual', maximal_booking_delay=3)
+    meetings_agenda1 = Agenda.objects.create(label='Foo Meeting', kind='meetings', maximal_booking_delay=3)
+    meetings_agenda2 = Agenda.objects.create(label='Bar Meeting', kind='meetings', maximal_booking_delay=3)
+    virtual_agenda = Agenda.objects.create(label='Agenda Virtual', kind='virtual', maximal_booking_delay=3)
     VirtualMember.objects.create(virtual_agenda=virtual_agenda, real_agenda=meetings_agenda1)
     VirtualMember.objects.create(virtual_agenda=virtual_agenda, real_agenda=meetings_agenda2)
     desk1 = Desk.objects.create(agenda=meetings_agenda1, label='Desk 1')
diff --git a/tests/api/test_statistics.py b/tests/api/test_statistics.py
index 38a99c4..fb4b55f 100644
--- a/tests/api/test_statistics.py
+++ b/tests/api/test_statistics.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import pytest
 from django.utils.timezone import now
 
diff --git a/tests/manager/conftest.py b/tests/manager/conftest.py
index 4312b78..bb11515 100644
--- a/tests/manager/conftest.py
+++ b/tests/manager/conftest.py
@@ -42,7 +42,7 @@ def api_user():
         user = User.objects.get(username='api-user')
     except User.DoesNotExist:
         user = User.objects.create(
-            username='john.doe', first_name=u'John', last_name=u'Doe', email='john.doe@example.net'
+            username='john.doe', first_name='John', last_name='Doe', email='john.doe@example.net'
         )
         user.set_password('password')
         user.save()
diff --git a/tests/manager/test_absence_reason.py b/tests/manager/test_absence_reason.py
index c5e2195..5830c71 100644
--- a/tests/manager/test_absence_reason.py
+++ b/tests/manager/test_absence_reason.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import copy
 import json
 
@@ -15,7 +13,7 @@ pytestmark = pytest.mark.django_db
 
 @pytest.fixture
 def agenda_with_restrictions(manager_user):
-    agenda = Agenda(label=u'Foo Bar')
+    agenda = Agenda(label='Foo Bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     return agenda
@@ -238,7 +236,7 @@ def test_delete_reason_as_manager(app, manager_user, agenda_with_restrictions):
 
 
 def test_meetings_agenda_group(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     AbsenceReasonGroup.objects.create(label='Foo bar')
 
     app = login(app)
@@ -250,7 +248,7 @@ def test_meetings_agenda_group(app, admin_user):
 
 
 def test_agenda_group(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='events')
+    agenda = Agenda.objects.create(label='Foo bar', kind='events')
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
 
     app = login(app)
diff --git a/tests/manager/test_all.py b/tests/manager/test_all.py
index b410ebf..0f52a35 100644
--- a/tests/manager/test_all.py
+++ b/tests/manager/test_all.py
@@ -1,12 +1,10 @@
-# -*- coding: utf-8 -*-
-
 import copy
 import datetime
 import json
 import os
+from unittest import mock
 
 import freezegun
-import mock
 import pytest
 import requests
 from django.contrib.auth.models import Group
@@ -68,7 +66,7 @@ def test_manager_user_access(app, manager_user):
     app = login(app, username='manager', password='manager')
     assert app.get('/manage/', status=403)
 
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     assert app.get('/manage/', status=403)
 
@@ -112,7 +110,7 @@ def test_menu_json(app, admin_user):
 
 
 def test_events_agenda_redirect(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='events')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='events')
 
     app = login(app)
     resp = app.get('/manage/agendas/%s/' % agenda.pk, status=302)
@@ -131,7 +129,7 @@ def test_events_agenda_redirect(app, admin_user):
 
 @freezegun.freeze_time('2020-07-12')
 def test_events_agenda_month_redirect(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='events')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='events')
 
     app = login(app)
     # no event, redirect to current month
@@ -183,7 +181,7 @@ def test_events_agenda_month_redirect(app, admin_user):
 
 @freezegun.freeze_time('2020-07-12')
 def test_events_agenda_day_redirect(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='events')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='events')
 
     app = login(app)
     # no event, redirect to current day
@@ -234,7 +232,7 @@ def test_events_agenda_day_redirect(app, admin_user):
 
 
 def test_meetings_agenda_redirect(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='meetings')
 
     app = login(app)
     resp = app.get('/manage/agendas/%s/' % agenda.pk, status=302)
@@ -247,7 +245,7 @@ def test_meetings_agenda_redirect(app, admin_user):
 
 
 def test_virtual_agenda_redirect(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='virtual')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='virtual')
 
     app = login(app)
     resp = app.get('/manage/agendas/%s/' % agenda.pk, status=302)
@@ -260,7 +258,7 @@ def test_virtual_agenda_redirect(app, admin_user):
 
 
 def test_view_agendas_as_admin(app, admin_user):
-    Agenda.objects.create(label=u'Bar Foo')
+    Agenda.objects.create(label='Bar Foo')
 
     app = login(app)
     resp = app.get('/manage/', status=200)
@@ -268,11 +266,11 @@ def test_view_agendas_as_admin(app, admin_user):
 
 
 def test_view_agendas_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo Bar')
+    agenda = Agenda(label='Foo Bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
 
-    agenda2 = Agenda(label=u'Bar Foo')
+    agenda2 = Agenda(label='Bar Foo')
     agenda2.save()
 
     app = login(app, username='manager', password='manager')
@@ -406,10 +404,10 @@ def test_add_agenda_and_set_role(app, admin_user, manager_user):
 
 
 def test_options_agenda(app, admin_user):
-    agenda_events = Agenda.objects.create(label=u'Foo bar', kind='events')
+    agenda_events = Agenda.objects.create(label='Foo bar', kind='events')
     Desk.objects.create(agenda=agenda_events, slug='_exceptions_holder')
-    agenda_meetings = Agenda.objects.create(label=u'Foo bar', kind='meetings')
-    Agenda.objects.create(label=u'Foo bar', kind='virtual')
+    agenda_meetings = Agenda.objects.create(label='Foo bar', kind='meetings')
+    Agenda.objects.create(label='Foo bar', kind='virtual')
 
     app = login(app)
     resp = app.get('/manage/agendas/%s/edit' % agenda_events.pk)
@@ -451,7 +449,7 @@ def test_options_agenda(app, admin_user):
 
 def test_options_events_agenda_delays(settings, app, admin_user):
     settings.WORKING_DAY_CALENDAR = None
-    agenda = Agenda.objects.create(label=u'Foo bar')
+    agenda = Agenda.objects.create(label='Foo bar')
     assert agenda.minimal_booking_delay == 1
     app = login(app)
     url = '/manage/agendas/%s/booking-delays' % agenda.pk
@@ -471,7 +469,7 @@ def test_options_events_agenda_delays(settings, app, admin_user):
 
 
 def test_options_meetings_agenda_delays(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings', maximal_booking_delay=2)
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings', maximal_booking_delay=2)
     assert agenda.maximal_booking_delay == 2
     app = login(app)
     url = '/manage/agendas/%s/booking-delays' % agenda.pk
@@ -484,7 +482,7 @@ def test_options_meetings_agenda_delays(app, admin_user):
 
 
 def test_options_virtual_agenda_delays(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='virtual', maximal_booking_delay=2)
+    agenda = Agenda.objects.create(label='Foo bar', kind='virtual', maximal_booking_delay=2)
     assert agenda.maximal_booking_delay == 2
     app = login(app)
     url = '/manage/agendas/%s/booking-delays' % agenda.pk
@@ -586,7 +584,7 @@ def test_options_agenda_event_display_template(app, admin_user):
 
 
 def test_options_agenda_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
@@ -696,7 +694,7 @@ def test_options_meetings_agenda_num_queries(app, admin_user, managers_group):
 
 @mock.patch('chrono.agendas.models.Agenda.is_available_for_simple_management')
 def test_agenda_options_desk_simple_management(available_mock, app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     app = login(app)
 
     available_mock.return_value = True
@@ -752,7 +750,7 @@ def test_agenda_options_desk_simple_management(available_mock, app, admin_user):
 
 
 def test_delete_agenda(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
     app = login(app)
@@ -766,7 +764,7 @@ def test_delete_agenda(app, admin_user):
 
 
 def test_delete_busy_agenda(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
     event = Event(start_datetime=now() + datetime.timedelta(days=10), places=10, agenda=agenda)
@@ -797,7 +795,7 @@ def test_delete_busy_agenda(app, admin_user):
 
 
 def test_delete_agenda_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.edit_role = manager_user.groups.all()[0]
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
@@ -809,7 +807,7 @@ def test_delete_agenda_as_manager(app, manager_user):
 
 
 def test_delete_busy_desk(app, admin_user):
-    agenda = Agenda(label=u'Foo bar', kind='meetings')
+    agenda = Agenda(label='Foo bar', kind='meetings')
     agenda.save()
     desk_a = Desk.objects.create(agenda=agenda, label='Desk A')
     Desk.objects.create(agenda=agenda, label='Desk B')
@@ -854,7 +852,7 @@ def test_add_meetings_agenda(app, admin_user):
 
 
 def test_meetings_agenda_add_meeting_type(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     app = login(app)
     resp = app.get('/manage/agendas/%s/settings' % agenda.pk)
     assert "This agenda doesn't have any meeting type yet." in resp.text
@@ -878,10 +876,10 @@ def test_meetings_agenda_add_meeting_type(app, admin_user):
 
 
 def test_meetings_agenda_edit_meeting_type(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     meeting_type = MeetingType.objects.create(agenda=agenda, label='Blah')
     meeting_type2 = MeetingType.objects.create(agenda=agenda, label='Other')
-    other_agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    other_agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     other_meeting_type = MeetingType.objects.create(agenda=other_agenda, label='Blah')
     assert meeting_type.slug == other_meeting_type.slug
 
@@ -905,7 +903,7 @@ def test_meetings_agenda_edit_meeting_type(app, admin_user):
 
 
 def test_meetings_agenda_delete_meeting_type(app, admin_user):
-    agenda = Agenda(label=u'Foo bar', kind='meetings')
+    agenda = Agenda(label='Foo bar', kind='meetings')
     agenda.save()
 
     meeting_type = MeetingType(agenda=agenda, label='Blah')
@@ -933,7 +931,7 @@ def test_meetings_agenda_delete_meeting_type(app, admin_user):
 
 
 def test_meetings_agenda_add_time_period(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     desk2 = Desk.objects.create(agenda=agenda, label='Desk B')
     MeetingType.objects.create(agenda=agenda, label='Blah')
@@ -959,8 +957,8 @@ def test_meetings_agenda_add_time_period(app, admin_user):
     resp.form['end_time'] = '13:00'
     resp = resp.form.submit()
     resp = resp.follow()
-    assert u'Monday / 10 a.m. → 1 p.m.' in resp.text
-    assert u'Wednesday / 10 a.m. → 5 p.m.' in resp.text
+    assert 'Monday / 10 a.m. → 1 p.m.' in resp.text
+    assert 'Wednesday / 10 a.m. → 5 p.m.' in resp.text
     assert resp.text.index('Monday') < resp.text.index('Wednesday')
 
     # invert start and end
@@ -982,7 +980,7 @@ def test_meetings_agenda_add_time_period(app, admin_user):
 
 
 def test_meetings_agenda_add_time_period_desk_simple_management(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings', desk_simple_management=True)
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings', desk_simple_management=True)
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     desk2 = Desk.objects.create(agenda=agenda, label='Desk B')
     assert agenda.is_available_for_simple_management() is True
@@ -1001,7 +999,7 @@ def test_meetings_agenda_add_time_period_desk_simple_management(app, admin_user)
 
 def test_meetings_agenda_add_time_period_on_missing_desk(app, admin_user):
     app = login(app)
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     app.get('/manage/agendas/%s/desk/0/add-time-period' % agenda.pk, status=404)
 
 
@@ -1037,7 +1035,7 @@ def test_meetings_agenda_add_time_period_as_manager(app, manager_user):
 
 
 def test_meetings_agenda_edit_time_period(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     time_period = TimePeriod.objects.create(
         desk=desk, weekday=0, start_time=datetime.time(9, 0), end_time=datetime.time(12, 0)
@@ -1066,7 +1064,7 @@ def test_meetings_agenda_edit_time_period(app, admin_user):
 
 
 def test_meetings_agenda_edit_time_period_desk_simple_management(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings', desk_simple_management=True)
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings', desk_simple_management=True)
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     time_period = TimePeriod.objects.create(
         desk=desk, weekday=0, start_time=datetime.time(9, 0), end_time=datetime.time(12, 0)
@@ -1106,7 +1104,7 @@ def test_meetings_agenda_edit_time_period_desk_simple_management(app, admin_user
 
 
 def test_meetings_agenda_delete_time_period(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     TimePeriod.objects.create(
         desk=desk, weekday=2, start_time=datetime.time(10, 0), end_time=datetime.time(18, 0)
@@ -1124,7 +1122,7 @@ def test_meetings_agenda_delete_time_period(app, admin_user):
 
 
 def test_meetings_agenda_delete_time_period_desk_simple_management(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings', desk_simple_management=True)
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings', desk_simple_management=True)
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     time_period = TimePeriod.objects.create(
         desk=desk, weekday=0, start_time=datetime.time(9, 0), end_time=datetime.time(12, 0)
@@ -1197,7 +1195,7 @@ def test_meetings_agenda_add_desk(app, admin_user):
     }
 )
 def test_meetings_agenda_add_desk_from_another(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     TimePeriod.objects.create(
         weekday=1, desk=desk, start_time=datetime.time(10, 0), end_time=datetime.time(12, 0)
@@ -1226,7 +1224,7 @@ def test_meetings_agenda_add_desk_from_another(app, admin_user):
     }
 )
 def test_meetings_agenda_add_desk_simple_management(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings', desk_simple_management=True)
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings', desk_simple_management=True)
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     TimePeriod.objects.create(
         weekday=1, desk=desk, start_time=datetime.time(10, 0), end_time=datetime.time(12, 0)
@@ -1259,10 +1257,10 @@ def test_meetings_agenda_add_desk_simple_management(app, admin_user):
 
 
 def test_meetings_agenda_edit_desk(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     desk2 = Desk.objects.create(agenda=agenda, label='Desk B')
-    other_agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    other_agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     other_desk = Desk.objects.create(agenda=other_agenda, label='Desk A')
     assert other_desk.slug == desk.slug
 
@@ -1297,7 +1295,7 @@ def test_meetings_agenda_edit_desk(app, admin_user):
 
 
 def test_meetings_agenda_delete_desk(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     Desk.objects.create(agenda=agenda, label='Desk A')
     desk_b = Desk.objects.create(agenda=agenda, label='Desk B')
 
@@ -1328,7 +1326,7 @@ def test_meetings_agenda_delete_desk(app, admin_user):
 
 
 def test_meetings_agenda_add_time_period_exception(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     desk2 = Desk.objects.create(agenda=agenda, label='Desk B')
 
@@ -1371,7 +1369,7 @@ def test_meetings_agenda_add_time_period_exception(app, admin_user):
 
 
 def test_meetings_agenda_add_time_period_exception_booking_overlaps(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
     meeting_type = MeetingType.objects.create(agenda=agenda, label='Blah')
 
@@ -1399,7 +1397,7 @@ def test_meetings_agenda_add_time_period_exception_booking_overlaps(app, admin_u
 
 
 def test_meetings_agenda_add_time_period_exception_all_desks(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     desk = Desk.objects.create(agenda=agenda, label='Desk A')
 
     # add global time exception
@@ -3303,7 +3301,7 @@ def test_agenda_month_view_event_outside_timeperiod(app, admin_user, kind):
 
 
 def test_agenda_view_event(app, manager_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     event = Event.objects.create(
@@ -3411,7 +3409,7 @@ def test_import_agenda_as_manager(app, manager_user):
 
 
 def test_import_agenda(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
 
@@ -3479,14 +3477,14 @@ def test_import_agenda(app, admin_user):
 
     # reference to unknown group
     agenda_export_dict = json.loads(force_text(agenda_export))
-    agenda_export_dict['agendas'][0]['permissions']['view'] = u'gé1'
+    agenda_export_dict['agendas'][0]['permissions']['view'] = 'gé1'
     agenda_export = json.dumps(agenda_export_dict).encode('utf-8')
     Agenda.objects.all().delete()
     resp = app.get('/manage/', status=200)
     resp = resp.click('Import')
     resp.form['agendas_json'] = Upload('export.json', agenda_export, 'application/json')
     resp = resp.form.submit()
-    assert u'Missing roles: &quot;gé1&quot;' in resp.text
+    assert 'Missing roles: &quot;gé1&quot;' in resp.text
     del agenda_export_dict['agendas'][0]['permissions']['view']
 
     # missing field
@@ -3832,7 +3830,7 @@ def test_virtual_agenda_settings_add_excluded_period(app, admin_user):
     assert tp.end_time.minute == 0
 
     resp = resp.follow()
-    assert u'Monday / 10 a.m. → 5 p.m.' in resp.text
+    assert 'Monday / 10 a.m. → 5 p.m.' in resp.text
 
 
 def test_virtual_agenda_settings_edit_excluded_period(app, admin_user):
@@ -4033,7 +4031,7 @@ def test_cant_add_meetingtype_if_virtual_agenda(app, admin_user):
 
 
 def test_duplicate_agenda(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', slug='foo-bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo Bar', slug='foo-bar', kind='meetings')
     assert Agenda.objects.count() == 1
 
     app = login(app)
@@ -4338,7 +4336,7 @@ def test_export_site(app, admin_user):
     site_json = json.loads(resp.text)
     assert site_json == {'unavailability_calendars': [], 'agendas': [], 'absence_reason_groups': []}
 
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='events')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='events')
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
     UnavailabilityCalendar.objects.create(label='Calendar 1')
     resp = app.get('/manage/agendas/export/')
diff --git a/tests/manager/test_category.py b/tests/manager/test_category.py
index bed5acb..f583722 100644
--- a/tests/manager/test_category.py
+++ b/tests/manager/test_category.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import pytest
 
 from chrono.agendas.models import Agenda, Category
@@ -10,7 +8,7 @@ pytestmark = pytest.mark.django_db
 
 
 def test_list_categories_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo Bar')
+    agenda = Agenda(label='Foo Bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     app = login(app, username='manager', password='manager')
@@ -34,7 +32,7 @@ def test_add_category(app, admin_user):
 
 
 def test_add_category_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo Bar')
+    agenda = Agenda(label='Foo Bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     app = login(app, username='manager', password='manager')
@@ -57,7 +55,7 @@ def test_edit_category(app, admin_user):
 
 
 def test_edit_category_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo Bar')
+    agenda = Agenda(label='Foo Bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     category = Category.objects.create(label='Foo bar')
@@ -77,7 +75,7 @@ def test_delete_category(app, admin_user):
 
 
 def test_delete_category_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo Bar')
+    agenda = Agenda(label='Foo Bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     category = Category.objects.create(label='Foo bar')
diff --git a/tests/manager/test_event.py b/tests/manager/test_event.py
index b3f048f..69b0913 100644
--- a/tests/manager/test_event.py
+++ b/tests/manager/test_event.py
@@ -1,9 +1,7 @@
-# -*- coding: utf-8 -*-
-
 import codecs
 import datetime
+from unittest import mock
 
-import mock
 import pytest
 import requests
 from django.core.management import call_command
@@ -20,7 +18,7 @@ pytestmark = pytest.mark.django_db
 
 
 def test_add_event(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.maximal_booking_delay = 0
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
@@ -71,7 +69,7 @@ def test_add_event_on_missing_agenda(app, admin_user):
 
 
 def test_add_event_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
@@ -111,7 +109,7 @@ def test_add_event_as_manager(app, manager_user):
 
 def test_edit_event(settings, app, admin_user):
     settings.LANGUAGE_CODE = 'fr-fr'  # check date initial value format
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     event = Event(start_datetime=make_aware(datetime.datetime(2016, 2, 15, 17, 0)), places=20, agenda=agenda)
     event.save()
@@ -144,7 +142,7 @@ def test_edit_event(settings, app, admin_user):
 
 
 def test_event_digit_slug(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.maximal_booking_delay = 0
     agenda.save()
     event = Event.objects.create(agenda=agenda, start_datetime=now(), places=10)
@@ -162,7 +160,7 @@ def test_edit_missing_event(app, admin_user):
 
 
 def test_edit_event_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
@@ -340,7 +338,7 @@ def test_edit_recurring_event_with_end_date(settings, app, admin_user, freezer):
 
 
 def test_booked_places(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     event = Event(start_datetime=make_aware(datetime.datetime(2016, 2, 15, 17, 0)), places=10, agenda=agenda)
     event.save()
@@ -355,7 +353,7 @@ def test_booked_places(app, admin_user):
 
 
 def test_event_classes(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
     event = Event(start_datetime=make_aware(datetime.datetime(2016, 2, 15, 17, 0)), places=10, agenda=agenda)
@@ -390,7 +388,7 @@ def test_event_classes(app, admin_user):
 
 
 def test_delete_event(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
     event = Event(start_datetime=make_aware(datetime.datetime(2016, 2, 15, 17, 0)), places=10, agenda=agenda)
@@ -406,7 +404,7 @@ def test_delete_event(app, admin_user):
 
 
 def test_delete_busy_event(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
     event = Event(start_datetime=now() + datetime.timedelta(days=10), places=10, agenda=agenda)
@@ -477,7 +475,7 @@ def test_delete_recurring_event(app, admin_user, freezer):
 
 
 def test_delete_event_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.edit_role = manager_user.groups.all()[0]
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
@@ -494,7 +492,7 @@ def test_delete_event_as_manager(app, manager_user):
 
 
 def test_export_events(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar')
+    agenda = Agenda.objects.create(label='Foo bar')
 
     app = login(app)
     resp = app.get('/manage/agendas/%s/export-events' % agenda.id)
@@ -534,7 +532,7 @@ def test_export_events(app, admin_user):
 
 
 def test_export_events_wrong_kind(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
 
     app = login(app)
     app.get('/manage/agendas/%s/export-events' % agenda.id, status=404)
@@ -544,7 +542,7 @@ def test_export_events_wrong_kind(app, admin_user):
 
 
 def test_import_events(app, admin_user):
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
 
@@ -607,52 +605,50 @@ def test_import_events(app, admin_user):
     Event.objects.all().delete()
 
     resp = app.get('/manage/agendas/%s/import-events' % agenda.id, status=200)
-    resp.form['events_csv_file'] = Upload(
-        't.csv', u'2016-09-16,18:00,10,5,éléphant'.encode('utf-8'), 'text/csv'
-    )
+    resp.form['events_csv_file'] = Upload('t.csv', '2016-09-16,18:00,10,5,éléphant'.encode(), 'text/csv')
     resp = resp.form.submit(status=302)
     assert Event.objects.count() == 1
     assert Event.objects.all()[0].start_datetime == make_aware(datetime.datetime(2016, 9, 16, 18, 0))
     assert Event.objects.all()[0].places == 10
     assert Event.objects.all()[0].waiting_list_places == 5
-    assert Event.objects.all()[0].label == u'éléphant'
+    assert Event.objects.all()[0].label == 'éléphant'
     Event.objects.all().delete()
 
     # BOM
     resp = app.get('/manage/agendas/%s/import-events' % agenda.id, status=200)
     resp.form['events_csv_file'] = Upload(
-        't.csv', codecs.BOM_UTF8 + u'2016-09-16,18:00,10,5,éléphant'.encode('utf-8'), 'text/csv'
+        't.csv', codecs.BOM_UTF8 + '2016-09-16,18:00,10,5,éléphant'.encode(), 'text/csv'
     )
     resp = resp.form.submit(status=302)
     assert Event.objects.count() == 1
     assert Event.objects.all()[0].start_datetime == make_aware(datetime.datetime(2016, 9, 16, 18, 0))
     assert Event.objects.all()[0].places == 10
     assert Event.objects.all()[0].waiting_list_places == 5
-    assert Event.objects.all()[0].label == u'éléphant'
+    assert Event.objects.all()[0].label == 'éléphant'
     Event.objects.all().delete()
 
     resp = app.get('/manage/agendas/%s/import-events' % agenda.id, status=200)
     resp.form['events_csv_file'] = Upload(
-        't.csv', u'2016-09-16,18:00,10,5,éléphant'.encode('iso-8859-15'), 'text/csv'
+        't.csv', '2016-09-16,18:00,10,5,éléphant'.encode('iso-8859-15'), 'text/csv'
     )
     resp = resp.form.submit(status=302)
     assert Event.objects.count() == 1
     assert Event.objects.all()[0].start_datetime == make_aware(datetime.datetime(2016, 9, 16, 18, 0))
     assert Event.objects.all()[0].places == 10
     assert Event.objects.all()[0].waiting_list_places == 5
-    assert Event.objects.all()[0].label == u'éléphant'
+    assert Event.objects.all()[0].label == 'éléphant'
     Event.objects.all().delete()
 
     resp = app.get('/manage/agendas/%s/import-events' % agenda.id, status=200)
     resp.form['events_csv_file'] = Upload(
-        't.csv', u'2016-09-16,18:00,10,5,éléphant'.encode('eucjp'), 'text/csv'
+        't.csv', '2016-09-16,18:00,10,5,éléphant'.encode('eucjp'), 'text/csv'
     )
     resp = resp.form.submit(status=302)
     assert Event.objects.count() == 1
     assert Event.objects.all()[0].start_datetime == make_aware(datetime.datetime(2016, 9, 16, 18, 0))
     assert Event.objects.all()[0].places == 10
     assert Event.objects.all()[0].waiting_list_places == 5
-    assert Event.objects.all()[0].label == u'\x8f«±l\x8f«±phant'  # eucjp interpreted as iso-8859-15
+    assert Event.objects.all()[0].label == '\x8f«±l\x8f«±phant'  # eucjp interpreted as iso-8859-15
     Event.objects.all().delete()
 
     resp = app.get('/manage/agendas/%s/import-events' % agenda.id, status=200)
@@ -754,9 +750,13 @@ def test_import_events(app, admin_user):
         resp = resp.form.submit(status=302)
         assert len(ctx.captured_queries) == 22
     assert Event.objects.count() == 5
-    assert set(Event.objects.values_list('slug', flat=True)) == set(
-        ['labelb', 'labelb-1', 'labelb-2', 'labelb-3', 'labelb-4']
-    )
+    assert set(Event.objects.values_list('slug', flat=True)) == {
+        'labelb',
+        'labelb-1',
+        'labelb-2',
+        'labelb-3',
+        'labelb-4',
+    }
 
     # forbidden numerical slug
     Event.objects.all().delete()
@@ -768,7 +768,7 @@ def test_import_events(app, admin_user):
 
 
 def test_import_events_existing_event(app, admin_user, freezer):
-    agenda = Agenda.objects.create(label=u'Foo bar')
+    agenda = Agenda.objects.create(label='Foo bar')
     Desk.objects.create(agenda=agenda, slug='_exceptions_holder')
 
     app = login(app)
@@ -803,7 +803,7 @@ def test_import_events_existing_event(app, admin_user, freezer):
                 not in resp.text
             )
         assert event.start_datetime == make_aware(
-            datetime.datetime(*[int(v) for v in date.split('-')], *[int(v) for v in time.split(':')])
+            datetime.datetime(*(int(v) for v in date.split('-')), *(int(v) for v in time.split(':')))
         )
 
     # change date or time
@@ -867,7 +867,7 @@ def test_import_events_existing_event(app, admin_user, freezer):
 
 
 def test_import_events_wrong_kind(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
 
     app = login(app)
     app.get('/manage/agendas/%s/import-events' % agenda.id, status=404)
diff --git a/tests/manager/test_resource.py b/tests/manager/test_resource.py
index 331281c..66f86aa 100644
--- a/tests/manager/test_resource.py
+++ b/tests/manager/test_resource.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import datetime
 
 import freezegun
@@ -16,7 +14,7 @@ pytestmark = pytest.mark.django_db
 
 
 def test_list_resources_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo Bar')
+    agenda = Agenda(label='Foo Bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     app = login(app, username='manager', password='manager')
@@ -40,7 +38,7 @@ def test_add_resource(app, admin_user):
 
 
 def test_add_resource_as_manager(app, manager_user):
-    agenda = Agenda(label=u'Foo Bar')
+    agenda = Agenda(label='Foo Bar')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     app = login(app, username='manager', password='manager')
@@ -48,7 +46,7 @@ def test_add_resource_as_manager(app, manager_user):
 
 
 def test_view_resource(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='meetings')
     resource = Resource.objects.create(label='Resource 1')
 
     app = login(app)
@@ -61,7 +59,7 @@ def test_view_resource(app, admin_user):
 
 
 def test_view_resource_as_manager(app, manager_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='meetings')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     resource = Resource.objects.create(label='Resource 1')
@@ -200,7 +198,7 @@ def test_resource_day_view_event_outside_timeperiod(app, admin_user):
 
 
 def test_day_view_resource_as_manager(app, manager_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='meetings')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     resource = Resource.objects.create(label='Resource 1')
@@ -467,7 +465,7 @@ def test_resource_month_view_event_outside_timeperiod(app, admin_user):
 
 
 def test_month_view_resource_as_manager(app, manager_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='meetings')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     resource = Resource.objects.create(label='Resource 1')
@@ -492,7 +490,7 @@ def test_edit_resource(app, admin_user):
 
 
 def test_edit_resource_as_manager(app, manager_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='meetings')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     resource = Resource.objects.create(label='Resource 1')
@@ -512,7 +510,7 @@ def test_delete_resource(app, admin_user):
 
 
 def test_delete_resource_as_manager(app, manager_user):
-    agenda = Agenda.objects.create(label=u'Foo Bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo Bar', kind='meetings')
     agenda.view_role = manager_user.groups.all()[0]
     agenda.save()
     resource = Resource.objects.create(label='Resource 1')
@@ -521,7 +519,7 @@ def test_delete_resource_as_manager(app, manager_user):
 
 
 def test_agenda_resources(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='events')
+    agenda = Agenda.objects.create(label='Foo bar', kind='events')
     resource = Resource.objects.create(label='Resource 1')
     app = login(app)
     # not for events agenda
@@ -530,7 +528,7 @@ def test_agenda_resources(app, admin_user):
 
 
 def test_meetings_agenda_resources(app, admin_user):
-    agenda = Agenda.objects.create(label=u'Foo bar', kind='meetings')
+    agenda = Agenda.objects.create(label='Foo bar', kind='meetings')
     app = login(app)
     resp = app.get('/manage/agendas/%s/settings' % agenda.pk)
     assert 'has_resources' in resp.context
diff --git a/tests/manager/test_unavailability_calendar.py b/tests/manager/test_unavailability_calendar.py
index a23f13c..669b143 100644
--- a/tests/manager/test_unavailability_calendar.py
+++ b/tests/manager/test_unavailability_calendar.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import copy
 import datetime
 import json
@@ -26,7 +24,7 @@ pytestmark = pytest.mark.django_db
 
 
 def test_import_unavailability_calendar(app, admin_user):
-    calendar = UnavailabilityCalendar.objects.create(label=u'Foo bar')
+    calendar = UnavailabilityCalendar.objects.create(label='Foo bar')
 
     app = login(app)
     with freezegun.freeze_time('2020-06-15'):
@@ -95,14 +93,14 @@ def test_import_unavailability_calendar(app, admin_user):
 
     # reference to unknown group
     calendar_export_dict = json.loads(force_text(calendar_export))
-    calendar_export_dict['unavailability_calendars'][0]['permissions']['view'] = u'gé1'
+    calendar_export_dict['unavailability_calendars'][0]['permissions']['view'] = 'gé1'
     calendar_export = json.dumps(calendar_export_dict).encode('utf-8')
     UnavailabilityCalendar.objects.all().delete()
     resp = app.get('/manage/', status=200)
     resp = resp.click('Import')
     resp.form['agendas_json'] = Upload('export.json', calendar_export, 'application/json')
     resp = resp.form.submit()
-    assert u'Missing roles: &quot;gé1&quot;' in resp.text
+    assert 'Missing roles: &quot;gé1&quot;' in resp.text
     del calendar_export_dict['unavailability_calendars'][0]['permissions']['view']
 
 
diff --git a/tests/test_agendas.py b/tests/test_agendas.py
index a569326..bbf25d4 100644
--- a/tests/test_agendas.py
+++ b/tests/test_agendas.py
@@ -1,8 +1,8 @@
 import datetime
 import json
 import smtplib
+from unittest import mock
 
-import mock
 import pytest
 import requests
 from django.contrib.auth.models import Group, User
@@ -116,83 +116,83 @@ with open('tests/data/atreal.ics') as f:
 
 
 def test_slug():
-    agenda = Agenda(label=u'Foo bar')
+    agenda = Agenda(label='Foo bar')
     agenda.save()
     assert agenda.slug == 'foo-bar'
 
 
 def test_existing_slug():
-    agenda = Agenda(label=u'Foo bar', slug='bar')
+    agenda = Agenda(label='Foo bar', slug='bar')
     agenda.save()
     assert agenda.slug == 'bar'
 
 
 def test_duplicate_slugs():
-    agenda = Agenda(label=u'Foo baz')
+    agenda = Agenda(label='Foo baz')
     agenda.save()
     assert agenda.slug == 'foo-baz'
-    agenda = Agenda(label=u'Foo baz')
+    agenda = Agenda(label='Foo baz')
     agenda.save()
     assert agenda.slug == 'foo-baz-1'
-    agenda = Agenda(label=u'Foo baz')
+    agenda = Agenda(label='Foo baz')
     agenda.save()
     assert agenda.slug == 'foo-baz-2'
 
 
 def test_resource_slug():
-    resource = Resource.objects.create(label=u'Foo bar')
+    resource = Resource.objects.create(label='Foo bar')
     assert resource.slug == 'foo-bar'
 
 
 def test_resource_existing_slug():
-    resource = Resource.objects.create(label=u'Foo bar', slug='bar')
+    resource = Resource.objects.create(label='Foo bar', slug='bar')
     assert resource.slug == 'bar'
 
 
 def test_resource_duplicate_slugs():
-    resource = Resource.objects.create(label=u'Foo baz')
+    resource = Resource.objects.create(label='Foo baz')
     assert resource.slug == 'foo-baz'
-    resource = Resource.objects.create(label=u'Foo baz')
+    resource = Resource.objects.create(label='Foo baz')
     assert resource.slug == 'foo-baz-1'
-    resource = Resource.objects.create(label=u'Foo baz')
+    resource = Resource.objects.create(label='Foo baz')
     assert resource.slug == 'foo-baz-2'
 
 
 def test_category_slug():
-    category = Category.objects.create(label=u'Foo bar')
+    category = Category.objects.create(label='Foo bar')
     assert category.slug == 'foo-bar'
 
 
 def test_category_existing_slug():
-    category = Category.objects.create(label=u'Foo bar', slug='bar')
+    category = Category.objects.create(label='Foo bar', slug='bar')
     assert category.slug == 'bar'
 
 
 def test_category_duplicate_slugs():
-    category = Category.objects.create(label=u'Foo baz')
+    category = Category.objects.create(label='Foo baz')
     assert category.slug == 'foo-baz'
-    category = Category.objects.create(label=u'Foo baz')
+    category = Category.objects.create(label='Foo baz')
     assert category.slug == 'foo-baz-1'
-    category = Category.objects.create(label=u'Foo baz')
+    category = Category.objects.create(label='Foo baz')
     assert category.slug == 'foo-baz-2'
 
 
 def test_absence_reason_group_slug():
-    group = AbsenceReasonGroup.objects.create(label=u'Foo bar')
+    group = AbsenceReasonGroup.objects.create(label='Foo bar')
     assert group.slug == 'foo-bar'
 
 
 def test_absence_reason_group_existing_slug():
-    group = AbsenceReasonGroup.objects.create(label=u'Foo bar', slug='bar')
+    group = AbsenceReasonGroup.objects.create(label='Foo bar', slug='bar')
     assert group.slug == 'bar'
 
 
 def test_absence_reason_group_duplicate_slugs():
-    group = AbsenceReasonGroup.objects.create(label=u'Foo baz')
+    group = AbsenceReasonGroup.objects.create(label='Foo baz')
     assert group.slug == 'foo-baz'
-    group = AbsenceReasonGroup.objects.create(label=u'Foo baz')
+    group = AbsenceReasonGroup.objects.create(label='Foo baz')
     assert group.slug == 'foo-baz-1'
-    group = AbsenceReasonGroup.objects.create(label=u'Foo baz')
+    group = AbsenceReasonGroup.objects.create(label='Foo baz')
     assert group.slug == 'foo-baz-2'
 
 
@@ -429,7 +429,7 @@ def test_event_existing_slug():
 
 
 def test_event_manager():
-    agenda = Agenda(label=u'Foo baz')
+    agenda = Agenda(label='Foo baz')
     agenda.save()
     event = Event(start_datetime=now(), places=10, agenda=agenda)
     event.save()
@@ -460,7 +460,7 @@ def test_event_manager():
 )
 def test_event_bookable_period(start_days, start_minutes, min_delay, max_delay, pub_days, expected):
     agenda = Agenda.objects.create(
-        label=u'Foo bar', minimal_booking_delay=min_delay, maximal_booking_delay=max_delay
+        label='Foo bar', minimal_booking_delay=min_delay, maximal_booking_delay=max_delay
     )
     event = Event.objects.create(
         start_datetime=localtime() + datetime.timedelta(days=start_days, minutes=start_minutes),
@@ -472,26 +472,26 @@ def test_event_bookable_period(start_days, start_minutes, min_delay, max_delay,
 
 
 def test_meeting_type_slugs():
-    agenda1 = Agenda(label=u'Foo bar')
+    agenda1 = Agenda(label='Foo bar')
     agenda1.save()
-    agenda2 = Agenda(label=u'Foo bar second')
+    agenda2 = Agenda(label='Foo bar second')
     agenda2.save()
 
-    meeting_type1 = MeetingType(agenda=agenda1, label=u'Baz')
+    meeting_type1 = MeetingType(agenda=agenda1, label='Baz')
     meeting_type1.save()
     assert meeting_type1.slug == 'baz'
 
-    meeting_type2 = MeetingType(agenda=agenda1, label=u'Baz')
+    meeting_type2 = MeetingType(agenda=agenda1, label='Baz')
     meeting_type2.save()
     assert meeting_type2.slug == 'baz-1'
 
-    meeting_type3 = MeetingType(agenda=agenda2, label=u'Baz')
+    meeting_type3 = MeetingType(agenda=agenda2, label='Baz')
     meeting_type3.save()
     assert meeting_type3.slug == 'baz'
 
 
 def test_timeperiodexception_creation_from_ics():
-    agenda = Agenda.objects.create(label=u'Test 1 agenda')
+    agenda = Agenda.objects.create(label='Test 1 agenda')
     desk = Desk.objects.create(label='Test 1 desk', agenda=agenda)
     source = desk.timeperiodexceptionsource_set.create(
         ics_filename='sample.ics', ics_file=ContentFile(ICS_SAMPLE, name='sample.ics')
@@ -501,7 +501,7 @@ def test_timeperiodexception_creation_from_ics():
 
 
 def test_timeperiodexception_creation_from_ics_without_startdt():
-    agenda = Agenda.objects.create(label=u'Test 2 agenda')
+    agenda = Agenda.objects.create(label='Test 2 agenda')
     desk = Desk.objects.create(label='Test 2 desk', agenda=agenda)
     lines = []
     # remove start datetimes from ics
@@ -517,7 +517,7 @@ def test_timeperiodexception_creation_from_ics_without_startdt():
 
 
 def test_timeperiodexception_creation_from_ics_without_enddt():
-    agenda = Agenda.objects.create(label=u'Test 3 agenda')
+    agenda = Agenda.objects.create(label='Test 3 agenda')
     desk = Desk.objects.create(label='Test 3 desk', agenda=agenda)
     lines = []
     # remove end datetimes from ics
@@ -535,7 +535,7 @@ def test_timeperiodexception_creation_from_ics_without_enddt():
 
 @pytest.mark.freeze_time('2017-12-01')
 def test_timeperiodexception_creation_from_ics_with_recurrences():
-    agenda = Agenda.objects.create(label=u'Test 4 agenda')
+    agenda = Agenda.objects.create(label='Test 4 agenda')
     desk = Desk.objects.create(label='Test 4 desk', agenda=agenda)
     source = desk.timeperiodexceptionsource_set.create(
         ics_filename='sample.ics', ics_file=ContentFile(ICS_SAMPLE_WITH_RECURRENT_EVENT, name='sample.ics')
@@ -545,7 +545,7 @@ def test_timeperiodexception_creation_from_ics_with_recurrences():
 
 
 def test_timeexception_creation_from_ics_with_dates():
-    agenda = Agenda.objects.create(label=u'Test 5 agenda')
+    agenda = Agenda.objects.create(label='Test 5 agenda')
     desk = Desk.objects.create(label='Test 5 desk', agenda=agenda)
     lines = []
     # remove end datetimes from ics
@@ -563,7 +563,7 @@ def test_timeexception_creation_from_ics_with_dates():
 
 
 def test_timeexception_create_from_invalid_ics():
-    agenda = Agenda.objects.create(label=u'Test 6 agenda')
+    agenda = Agenda.objects.create(label='Test 6 agenda')
     desk = Desk.objects.create(label='Test 6 desk', agenda=agenda)
     source = desk.timeperiodexceptionsource_set.create(
         ics_filename='sample.ics', ics_file=ContentFile(INVALID_ICS_SAMPLE, name='sample.ics')
@@ -574,7 +574,7 @@ def test_timeexception_create_from_invalid_ics():
 
 
 def test_timeexception_create_from_ics_with_no_events():
-    agenda = Agenda.objects.create(label=u'Test 7 agenda')
+    agenda = Agenda.objects.create(label='Test 7 agenda')
     desk = Desk.objects.create(label='Test 7 desk', agenda=agenda)
     source = desk.timeperiodexceptionsource_set.create(
         ics_filename='sample.ics', ics_file=ContentFile(ICS_SAMPLE_WITH_NO_EVENTS, name='sample.ics')
@@ -586,7 +586,7 @@ def test_timeexception_create_from_ics_with_no_events():
 
 @mock.patch('chrono.agendas.models.requests.get')
 def test_timeperiodexception_creation_from_remote_ics(mocked_get):
-    agenda = Agenda.objects.create(label=u'Test 8 agenda')
+    agenda = Agenda.objects.create(label='Test 8 agenda')
     desk = Desk.objects.create(label='Test 8 desk', agenda=agenda)
     mocked_response = mock.Mock()
     mocked_response.text = ICS_SAMPLE
@@ -605,7 +605,7 @@ def test_timeperiodexception_creation_from_remote_ics(mocked_get):
 
 @mock.patch('chrono.agendas.models.requests.get')
 def test_timeperiodexception_remote_ics_encoding(mocked_get):
-    agenda = Agenda.objects.create(label=u'Test 8 agenda')
+    agenda = Agenda.objects.create(label='Test 8 agenda')
     desk = Desk.objects.create(label='Test 8 desk', agenda=agenda)
     mocked_response = mock.Mock()
     mocked_response.content = ICS_SAMPLE.encode('iso-8859-15')
@@ -619,7 +619,7 @@ def test_timeperiodexception_remote_ics_encoding(mocked_get):
 
 @mock.patch('chrono.agendas.models.requests.get')
 def test_timeperiodexception_creation_from_unreachable_remote_ics(mocked_get):
-    agenda = Agenda.objects.create(label=u'Test 9 agenda')
+    agenda = Agenda.objects.create(label='Test 9 agenda')
     desk = Desk.objects.create(label='Test 9 desk', agenda=agenda)
     mocked_response = mock.Mock()
     mocked_response.text = ICS_SAMPLE
@@ -637,7 +637,7 @@ def test_timeperiodexception_creation_from_unreachable_remote_ics(mocked_get):
 
 @mock.patch('chrono.agendas.models.requests.get')
 def test_timeperiodexception_creation_from_forbidden_remote_ics(mocked_get):
-    agenda = Agenda.objects.create(label=u'Test 10 agenda')
+    agenda = Agenda.objects.create(label='Test 10 agenda')
     desk = Desk.objects.create(label='Test 10 desk', agenda=agenda)
     mocked_response = mock.Mock()
     mocked_response.status_code = 403
@@ -657,7 +657,7 @@ def test_timeperiodexception_creation_from_forbidden_remote_ics(mocked_get):
 
 @mock.patch('chrono.agendas.models.requests.get')
 def test_sync_desks_timeperiod_exceptions_from_ics(mocked_get, capsys):
-    agenda = Agenda.objects.create(label=u'Test 11 agenda')
+    agenda = Agenda.objects.create(label='Test 11 agenda')
     desk = Desk.objects.create(label='Test 11 desk', agenda=agenda)
     source = TimePeriodExceptionSource.objects.create(desk=desk, ics_url='http://example.com/sample.ics')
     mocked_response = mock.Mock()
@@ -715,7 +715,7 @@ def test_sync_desks_timeperiod_exceptions_from_ics(mocked_get, capsys):
     }
 )
 def test_timeperiodexception_from_settings():
-    agenda = Agenda(label=u'Test 1 agenda')
+    agenda = Agenda(label='Test 1 agenda')
     agenda.save()
     desk = Desk(label='Test 1 desk', agenda=agenda)
     desk.save()
@@ -749,7 +749,7 @@ def test_timeperiodexception_from_settings_command():
             'holidays': {'class': 'workalendar.europe.France', 'label': 'Holidays'},
         }
     }
-    agenda = Agenda(label=u'Test 1 agenda')
+    agenda = Agenda(label='Test 1 agenda')
     agenda.save()
 
     desk1 = Desk(label='Test 1 desk', agenda=agenda)
@@ -822,32 +822,28 @@ def test_base_meeting_duration():
 def test_timeperiodexception_creation_from_ics_with_duration():
     # test that event defined using duration works and give the same start and
     # end dates
-    agenda = Agenda.objects.create(label=u'Test 1 agenda')
+    agenda = Agenda.objects.create(label='Test 1 agenda')
     desk = Desk.objects.create(label='Test 1 desk', agenda=agenda)
     source = desk.timeperiodexceptionsource_set.create(
         ics_filename='sample.ics', ics_file=ContentFile(ICS_SAMPLE_WITH_DURATION, name='sample.ics')
     )
     source.refresh_timeperiod_exceptions_from_ics()
     assert TimePeriodException.objects.filter(desk=desk).count() == 2
-    assert set(TimePeriodException.objects.values_list('start_datetime', flat=True)) == set(
-        [
-            make_aware(datetime.datetime(2017, 8, 31, 19, 8, 0)),
-            make_aware(datetime.datetime(2017, 8, 30, 20, 8, 0)),
-        ]
-    )
-    assert set(TimePeriodException.objects.values_list('end_datetime', flat=True)) == set(
-        [
-            make_aware(datetime.datetime(2017, 8, 31, 22, 34, 0)),
-            make_aware(datetime.datetime(2017, 9, 1, 0, 34, 0)),
-        ]
-    )
+    assert set(TimePeriodException.objects.values_list('start_datetime', flat=True)) == {
+        make_aware(datetime.datetime(2017, 8, 31, 19, 8, 0)),
+        make_aware(datetime.datetime(2017, 8, 30, 20, 8, 0)),
+    }
+    assert set(TimePeriodException.objects.values_list('end_datetime', flat=True)) == {
+        make_aware(datetime.datetime(2017, 8, 31, 22, 34, 0)),
+        make_aware(datetime.datetime(2017, 9, 1, 0, 34, 0)),
+    }
 
 
 @pytest.mark.freeze_time('2017-12-01')
 def test_timeperiodexception_creation_from_ics_with_recurrences_in_the_past():
     # test that recurrent events before today are not created
     # also test that duration + recurrent events works
-    agenda = Agenda.objects.create(label=u'Test 4 agenda')
+    agenda = Agenda.objects.create(label='Test 4 agenda')
     desk = Desk.objects.create(label='Test 4 desk', agenda=agenda)
     source = desk.timeperiodexceptionsource_set.create(
         ics_filename='sample.ics',
@@ -855,13 +851,14 @@ def test_timeperiodexception_creation_from_ics_with_recurrences_in_the_past():
     )
     source.refresh_timeperiod_exceptions_from_ics()
     assert TimePeriodException.objects.filter(desk=desk).count() == 2
-    assert set(TimePeriodException.objects.values_list('start_datetime', flat=True)) == set(
-        [make_aware(datetime.datetime(2018, 1, 1)), make_aware(datetime.datetime(2019, 1, 1))]
-    )
+    assert set(TimePeriodException.objects.values_list('start_datetime', flat=True)) == {
+        make_aware(datetime.datetime(2018, 1, 1)),
+        make_aware(datetime.datetime(2019, 1, 1)),
+    }
 
 
 def test_timeperiodexception_creation_from_ics_with_recurrences_atreal():
-    agenda = Agenda.objects.create(label=u'Test atreal agenda')
+    agenda = Agenda.objects.create(label='Test atreal agenda')
     desk = Desk.objects.create(label='Test atreal desk', agenda=agenda)
     source = desk.timeperiodexceptionsource_set.create(
         ics_filename='sample.ics', ics_file=ContentFile(ICS_ATREAL, name='sample.ics')
@@ -871,9 +868,9 @@ def test_timeperiodexception_creation_from_ics_with_recurrences_atreal():
 
 
 def test_management_role_deletion():
-    group = Group(name=u'Group')
+    group = Group(name='Group')
     group.save()
-    agenda = Agenda(label=u'Test agenda', edit_role=group, view_role=group)
+    agenda = Agenda(label='Test agenda', edit_role=group, view_role=group)
     agenda.save()
 
     Group.objects.all().delete()
@@ -910,9 +907,9 @@ def test_event_bookings_annotation():
 
 
 def test_virtual_agenda_init():
-    agenda1 = Agenda.objects.create(label=u'Agenda 1', kind='meetings')
-    agenda2 = Agenda.objects.create(label=u'Agenda 2', kind='meetings')
-    virt_agenda = Agenda.objects.create(label=u'Virtual agenda', kind='virtual')
+    agenda1 = Agenda.objects.create(label='Agenda 1', kind='meetings')
+    agenda2 = Agenda.objects.create(label='Agenda 2', kind='meetings')
+    virt_agenda = Agenda.objects.create(label='Virtual agenda', kind='virtual')
     VirtualMember.objects.create(virtual_agenda=virt_agenda, real_agenda=agenda1)
     VirtualMember.objects.create(virtual_agenda=virt_agenda, real_agenda=agenda2)
     virt_agenda.save()
@@ -927,7 +924,7 @@ def test_virtual_agenda_init():
 
 
 def test_virtual_agenda_base_meeting_duration():
-    virt_agenda = Agenda.objects.create(label=u'Virtual agenda', kind='virtual')
+    virt_agenda = Agenda.objects.create(label='Virtual agenda', kind='virtual')
 
     with pytest.raises(ValueError):
         virt_agenda.get_base_meeting_duration()
@@ -1300,7 +1297,7 @@ def test_desk_duplicate_exception_source_from_settings():
 
 
 def test_agenda_meetings_duplicate():
-    group = Group(name=u'Group')
+    group = Group(name='Group')
     group.save()
     agenda = Agenda.objects.create(label='Agenda', kind='meetings', view_role=group)
     desk = Desk.objects.create(label='Desk', agenda=agenda)
@@ -1320,7 +1317,7 @@ def test_agenda_meetings_duplicate():
         start_datetime=now() + datetime.timedelta(days=1),
         end_datetime=now() + datetime.timedelta(days=2),
     )
-    resource = Resource.objects.create(label=u'Foo bar')
+    resource = Resource.objects.create(label='Foo bar')
     agenda.resources.add(resource)
 
     new_agenda = agenda.duplicate()
@@ -1420,9 +1417,9 @@ def test_agenda_events_duplicate():
 
 
 def test_agenda_virtual_duplicate():
-    agenda1 = Agenda.objects.create(label=u'Agenda 1', kind='meetings')
-    agenda2 = Agenda.objects.create(label=u'Agenda 2', kind='meetings')
-    virt_agenda = Agenda.objects.create(label=u'Virtual agenda', kind='virtual')
+    agenda1 = Agenda.objects.create(label='Agenda 1', kind='meetings')
+    agenda2 = Agenda.objects.create(label='Agenda 2', kind='meetings')
+    virt_agenda = Agenda.objects.create(label='Virtual agenda', kind='virtual')
     VirtualMember.objects.create(virtual_agenda=virt_agenda, real_agenda=agenda1)
     VirtualMember.objects.create(virtual_agenda=virt_agenda, real_agenda=agenda2)
     virt_agenda.save()
diff --git a/tests/test_ensure_jsonbfields.py b/tests/test_ensure_jsonbfields.py
index 28c69eb..24b4828 100644
--- a/tests/test_ensure_jsonbfields.py
+++ b/tests/test_ensure_jsonbfields.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import pytest
 from django.core.management import call_command
 from django.db import connection
diff --git a/tests/test_import_export.py b/tests/test_import_export.py
index 8bfa559..3bceaff 100644
--- a/tests/test_import_export.py
+++ b/tests/test_import_export.py
@@ -1,7 +1,3 @@
-# -*- coding: utf-8 -*-
-
-from __future__ import unicode_literals
-
 import copy
 import datetime
 import json
@@ -10,8 +6,8 @@ import shutil
 import sys
 import tempfile
 from io import StringIO
+from unittest import mock
 
-import mock
 import pytest
 from django.contrib.auth.models import Group
 from django.core.management import CommandError, call_command
@@ -71,7 +67,7 @@ def test_import_export(app):
     empty_output = get_output_of_command('export_site')
     assert len(json.loads(empty_output)['agendas']) == 0
 
-    Agenda(label=u'test').save()
+    Agenda(label='test').save()
     old_stdin = sys.stdin
     sys.stdin = StringIO(json.dumps({}))
     assert Agenda.objects.count() == 1
@@ -313,8 +309,8 @@ def test_import_export_meetings_agenda_options(app):
 
 def test_import_export_permissions(app):
     meetings_agenda = Agenda.objects.create(label='Foo Bar', kind='meetings')
-    group1 = Group.objects.create(name=u'gé1')
-    group2 = Group.objects.create(name=u'gé2')
+    group1 = Group.objects.create(name='gé1')
+    group2 = Group.objects.create(name='gé2')
     meetings_agenda.view_role = group1
     meetings_agenda.edit_role = group2
     meetings_agenda.save()
@@ -328,20 +324,20 @@ def test_import_export_permissions(app):
         import_site(json.loads(output), overwrite=True)
     assert 'gé1' in str(excinfo.value) and 'gé2' in str(excinfo.value)
 
-    group1 = Group(name=u'gé1')
+    group1 = Group(name='gé1')
     group1.save()
     with pytest.raises(AgendaImportError) as excinfo:
         import_site(json.loads(output), overwrite=True)
-    assert u'%s' % excinfo.value == u'Missing roles: "gé2"'
+    assert '%s' % excinfo.value == 'Missing roles: "gé2"'
 
     with tempfile.NamedTemporaryFile() as f:
         f.write(force_bytes(output))
         f.flush()
         with pytest.raises(CommandError) as excinfo:
             call_command('import_site', f.name)
-        assert u'%s' % excinfo.value == u'Missing roles: "gé2"'
+        assert '%s' % excinfo.value == 'Missing roles: "gé2"'
 
-    group2 = Group(name=u'gé2')
+    group2 = Group(name='gé2')
     group2.save()
     import_site(json.loads(output), overwrite=True)
 
@@ -817,8 +813,8 @@ def test_import_export_unavailability_calendar(app):
     payload = json.loads(output)
     assert len(payload['unavailability_calendars']) == 0
 
-    group1 = Group.objects.create(name=u'gé1')
-    group2 = Group.objects.create(name=u'gé2')
+    group1 = Group.objects.create(name='gé1')
+    group2 = Group.objects.create(name='gé2')
     calendar = UnavailabilityCalendar.objects.create(label='Calendar', view_role=group1, edit_role=group2)
     tp1_start = make_aware(datetime.datetime(2017, 5, 22, 8, 0))
     tp1_end = make_aware(datetime.datetime(2017, 5, 22, 12, 30))
diff --git a/tests/test_requests.py b/tests/test_requests.py
index ecb8e15..737743c 100644
--- a/tests/test_requests.py
+++ b/tests/test_requests.py
@@ -1,8 +1,6 @@
-# -*- coding: utf-8 -*-
-
+from unittest import mock
 from urllib import parse
 
-import mock
 import pytest
 from django.contrib.auth.models import AnonymousUser
 
@@ -146,4 +144,4 @@ def test_requests_cache():
             requests.get('http://cache.example.org/other', raise_if_not_cached=True)
 
         # check with unicode url
-        assert requests.get(u'http://cache.example.org/éléphant').content == b'hello second world'
+        assert requests.get('http://cache.example.org/éléphant').content == b'hello second world'
diff --git a/tests/test_time_periods.py b/tests/test_time_periods.py
index f9fbda6..93137ee 100644
--- a/tests/test_time_periods.py
+++ b/tests/test_time_periods.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 import datetime
 
 import pytest
@@ -14,7 +12,7 @@ pytestmark = pytest.mark.django_db
 
 
 def test_timeperiod_time_slots():
-    agenda = Agenda(label=u'Foo bar', slug='bar')
+    agenda = Agenda(label='Foo bar', slug='bar')
     agenda.save()
     desk = Desk.objects.create(label='Desk 1', agenda=agenda)
     meeting_type = MeetingType(duration=60, agenda=agenda)
@@ -126,7 +124,7 @@ def test_time_period_exception_as_string():
                 end_datetime=make_aware(datetime.datetime(2018, 1, 19)),
             )
         )
-        == u'18 jan. 2018'
+        == '18 jan. 2018'
     )
 
     # multiple full days
@@ -137,7 +135,7 @@ def test_time_period_exception_as_string():
                 end_datetime=make_aware(datetime.datetime(2018, 1, 20)),
             )
         )
-        == u'18 jan. 2018 → 20 jan. 2018'
+        == '18 jan. 2018 → 20 jan. 2018'
     )
 
     # a few hours in a day
@@ -148,7 +146,7 @@ def test_time_period_exception_as_string():
                 end_datetime=make_aware(datetime.datetime(2018, 1, 18, 12, 0)),
             )
         )
-        == u'18 jan. 2018 10:00 → 12:00'
+        == '18 jan. 2018 10:00 → 12:00'
     )
 
     # multiple days and different times
@@ -159,7 +157,7 @@ def test_time_period_exception_as_string():
                 end_datetime=make_aware(datetime.datetime(2018, 1, 20, 12, 0)),
             )
         )
-        == u'18 jan. 2018 10:00 → 20 jan. 2018 12:00'
+        == '18 jan. 2018 10:00 → 20 jan. 2018 12:00'
     )
 
 
@@ -169,7 +167,7 @@ def test_desk_opening_hours():
             Q(desk=desk) | Q(unavailability_calendar__desks=desk)
         )
 
-    agenda = Agenda(label=u'Foo bar', slug='bar')
+    agenda = Agenda(label='Foo bar', slug='bar')
     agenda.save()
     desk = Desk.objects.create(label='Desk 1', agenda=agenda)
 
@@ -237,7 +235,7 @@ def test_desk_opening_hours():
 
 def test_timeperiod_midnight_overlap_time_slots():
     # https://dev.entrouvert.org/issues/29142
-    agenda = Agenda(label=u'Foo bar', slug='bar')
+    agenda = Agenda(label='Foo bar', slug='bar')
     agenda.save()
     desk = Desk.objects.create(label='Desk 1', agenda=agenda)
     meeting_type = MeetingType(duration=120, agenda=agenda)
-- 
2.30.2

