0001-misc-apply-pyupgrade-61865.patch
functests/vivaticket/test_vivaticket.py | ||
---|---|---|
1 |
from __future__ import print_function |
|
2 | ||
3 | 1 |
import datetime |
4 | 2 |
import pprint |
5 | 3 |
import random |
passerelle/apps/actesweb/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/actesweb/migrations/0002_remove_actesweb_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/actesweb/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2018 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
... | ... | |
13 | 12 |
# |
14 | 13 |
# You should have received a copy of the GNU Affero General Public License |
15 | 14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 |
from __future__ import unicode_literals |
|
17 | 15 | |
18 | 16 |
import contextlib |
19 | 17 |
import json |
passerelle/apps/airquality/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/airquality/migrations/0002_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/airquality/migrations/0003_remove_airquality_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/airquality/migrations/0004_airquality_atmo_aura_api_token.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2020-12-21 12:54 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/airquality/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2017-2020 Entr'ouvert |
4 | 3 |
# |
passerelle/apps/api_entreprise/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-03-15 09:38 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/api_entreprise/migrations/0002_auto_20190701_1357.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-07-01 11:57 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/api_particulier/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/api_particulier/migrations/0002_auto_20181118_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/api_particulier/migrations/0003_auto_20190212_0426.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.10 on 2019-02-12 10:26 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/api_particulier/migrations/0004_auto_20190215_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2019-02-15 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/api_particulier/migrations/0005_auto_20210610_1508.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2021-06-10 13:08 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/arcgis/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/arcgis/migrations/0002_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/arcgis/migrations/0003_auto_20181102_1550.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.16 on 2018-11-02 14:50 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/arcgis/migrations/0004_remove_arcgis_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/arcgis/migrations/0005_auto_20200310_1517.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2020-03-10 20:17 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
... | ... | |
73 | 71 |
), |
74 | 72 |
migrations.AlterUniqueTogether( |
75 | 73 |
name='query', |
76 |
unique_together=set([('resource', 'name'), ('resource', 'slug')]),
|
|
74 |
unique_together={('resource', 'name'), ('resource', 'slug')},
|
|
77 | 75 |
), |
78 | 76 |
] |
passerelle/apps/arcgis/migrations/0006_auto_20200401_1025.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-04-01 08:25 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/arcgis/models.py | ||
---|---|---|
111 | 111 |
lon, lat = float(lon), float(lat) |
112 | 112 |
except (ValueError,): |
113 | 113 |
raise APIError('<lon> and <lat> must be floats', http_status=400) |
114 |
params['geometry'] = '{},{}'.format(lon, lat)
|
|
114 |
params['geometry'] = f'{lon},{lat}'
|
|
115 | 115 |
params['geometryType'] = 'esriGeometryPoint' |
116 | 116 |
elif latmin and lonmin and latmax and lonmax: |
117 | 117 |
try: |
... | ... | |
119 | 119 |
lonmax, latmax = float(lonmax), float(latmax) |
120 | 120 |
except (ValueError,): |
121 | 121 |
raise APIError('<lonmin> <latmin> <lonmax> and <latmax> must be floats', http_status=400) |
122 |
params['geometry'] = '{},{},{},{}'.format(lonmin, latmin, lonmax, latmax)
|
|
122 |
params['geometry'] = f'{lonmin},{latmin},{lonmax},{latmax}'
|
|
123 | 123 |
params['geometryType'] = 'esriGeometryEnvelope' |
124 | 124 |
# consider all remaining parameters as ArcGIS ones |
125 | 125 |
params.update(kwargs) |
... | ... | |
370 | 370 |
@classmethod |
371 | 371 |
def import_json_real(cls, overwrite, instance, d, **kwargs): |
372 | 372 |
queries = d.pop('queries', []) |
373 |
instance = super(ArcGIS, cls).import_json_real(overwrite, instance, d, **kwargs)
|
|
373 |
instance = super().import_json_real(overwrite, instance, d, **kwargs) |
|
374 | 374 |
new = [] |
375 | 375 |
if instance and overwrite: |
376 | 376 |
Query.objects.filter(resource=instance).delete() |
passerelle/apps/arpege_ecp/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/arpege_ecp/migrations/0002_remove_arpegeecp_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/astech/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-04-08 22:32 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/astre_rest/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2022 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/apps/astregs/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-06-19 10:24 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
... | ... | |
60 | 58 |
), |
61 | 59 |
migrations.AlterUniqueTogether( |
62 | 60 |
name='link', |
63 |
unique_together=set([('resource', 'name_id', 'association_id')]),
|
|
61 |
unique_together={('resource', 'name_id', 'association_id')},
|
|
64 | 62 |
), |
65 | 63 |
] |
passerelle/apps/astregs/migrations/0002_auto_20191006_1501.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-10-06 13:01 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/astregs/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2019 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
... | ... | |
570 | 569 |
} |
571 | 570 |
) |
572 | 571 |
if r.TelephoneMobile: |
573 |
mobile = ''.join((n for n in r.TelephoneMobile if is_number(n)))
|
|
572 |
mobile = ''.join(n for n in r.TelephoneMobile if is_number(n))
|
|
574 | 573 |
if mobile and len(mobile) == 10 and mobile[:2] in ('06', '07'): |
575 | 574 |
data.append( |
576 | 575 |
{ |
passerelle/apps/atal/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2019-05-24 10:25 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/atal/schemas.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
# passerelle - uniform access to multiple data sources and services |
4 | 2 |
# Copyright (C) 2019 Entr'ouvert |
5 | 3 |
# |
passerelle/apps/atos_genesys/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.10 on 2018-09-18 09:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
import django.db.models.deletion |
... | ... | |
109 | 107 |
), |
110 | 108 |
migrations.AlterUniqueTogether( |
111 | 109 |
name='link', |
112 |
unique_together=set([('resource', 'name_id', 'id_per')]),
|
|
110 |
unique_together={('resource', 'name_id', 'id_per')},
|
|
113 | 111 |
), |
114 | 112 |
] |
passerelle/apps/atos_genesys/migrations/0002_remove_resource_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/atos_genesys/migrations/0003_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/atos_genesys/migrations/0004_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/base_adresse/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0002_auto_20150705_0330.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0003_baseaddresse_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0004_auto_20160316_0910.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0005_auto_20160407_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0006_rename_model.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0007_auto_20160729_1540.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0008_delete_updatestreetmodel.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0009_streetmodel_simple_name.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0010_auto_20160914_0826.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0011_auto_20160919_0949.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0012_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/base_adresse/migrations/0013_remove_baseadresse_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/base_adresse/migrations/0014_auto_20190207_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2019-02-07 10:56 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/base_adresse/migrations/0015_auto_20191206_1244.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2019-12-06 11:44 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
... | ... | |
130 | 128 |
), |
131 | 129 |
migrations.AlterUniqueTogether( |
132 | 130 |
name='citymodel', |
133 |
unique_together=set([('code', 'zipcode')]),
|
|
131 |
unique_together={('code', 'zipcode')},
|
|
134 | 132 |
), |
135 | 133 |
] |
passerelle/apps/base_adresse/migrations/0016_auto_20200130_1604.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-01-30 15:04 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/base_adresse/migrations/0017_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/base_adresse/migrations/0018_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/base_adresse/migrations/0027_auto_20220603_0456.py | ||
---|---|---|
23 | 23 |
migrations.RunPython(forwards), |
24 | 24 |
migrations.AlterUniqueTogether( |
25 | 25 |
name='streetmodel', |
26 |
unique_together=set([('resource', 'ban_id')]),
|
|
26 |
unique_together={('resource', 'ban_id')},
|
|
27 | 27 |
), |
28 | 28 |
migrations.AddIndex( |
29 | 29 |
model_name='streetmodel', |
passerelle/apps/base_adresse/migrations/0028_alter_streetmodel_ban_id.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2022-06-03 09:56 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/bdp/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/bdp/migrations/0002_bdp_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/bdp/migrations/0003_auto_20160316_0910.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/bdp/migrations/0004_auto_20160407_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/bdp/migrations/0005_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/bdp/migrations/0006_remove_bdp_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-02-20 10:38 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0002_cartadsdatacache.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-08-31 09:48 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/cartads_cs/migrations/0003_cartadsdossier_name_id.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-09-02 14:05 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0004_cartadsdossier_cartads_steps_cache.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-09-03 07:19 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations |
passerelle/apps/cartads_cs/migrations/0005_cartadsfile_sent_to_cartads.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-09-13 06:50 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0006_cartadscs_client_name.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-09-19 10:10 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0007_auto_20190923_1711.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-09-23 15:11 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0008_auto_20190923_1712.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-09-23 15:12 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0009_cartadsdossier_formdata_url.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-09-25 13:27 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0010_cartadsdossier_cartads_cache_code_acces.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-09-30 15:10 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0011_cartadsdossier_cartads_cache_infos.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-09-30 15:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations |
passerelle/apps/cartads_cs/migrations/0012_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/cartads_cs/migrations/0013_cartadsdossier_deleted.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2021-06-20 18:51 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/cartads_cs/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2018 Entr'ouvert |
4 | 3 |
# |
passerelle/apps/choosit/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.core.validators |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/apps/choosit/migrations/0002_auto_20160316_0528.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/choosit/migrations/0003_auto_20160316_0910.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/choosit/migrations/0004_auto_20160407_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/choosit/migrations/0005_choositsmsgateway_default_trunk_prefix.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.core.validators |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/apps/choosit/migrations/0006_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/choosit/migrations/0007_auto_20180814_1048.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-08-14 15:48 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/choosit/migrations/0008_auto_20181118_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/choosit/migrations/0009_choositsmsgateway_max_message_length.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-03-10 14:39 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/choosit/migrations/0010_auto_20210202_1304.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-02-02 12:04 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/choosit/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
import json |
3 | 2 | |
4 | 3 |
import requests |
passerelle/apps/cityweb/cityweb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2017 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/apps/cityweb/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/cityweb/migrations/0002_auto_20170920_1002.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/cityweb/migrations/0003_remove_cityweb_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/cityweb/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2017 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/apps/clicrdv/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/apps/clicrdv/migrations/0001_squashed_0006_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.8 on 2018-03-01 14:20 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/clicrdv/migrations/0002_clicrdv_group_id.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/apps/clicrdv/migrations/0002_remove_clicrdv_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/clicrdv/migrations/0003_auto_20160920_0903.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/apps/clicrdv/migrations/0004_newclicrdv.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/clicrdv/migrations/0005_auto_20161218_1701.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/apps/clicrdv/migrations/0006_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/cmis/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/cmis/migrations/0002_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/cmis/migrations/0003_auto_20181118_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/cryptor/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-03-04 10:25 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import uuid |
6 | 4 |
passerelle/apps/cryptor/models.py | ||
---|---|---|
217 | 217 |
with open(content_filename, 'rb') as fd: |
218 | 218 |
content = read_decrypt(fd, self.private_key) |
219 | 219 | |
220 |
with open(metadata_filename, 'r') as fd:
|
|
220 |
with open(metadata_filename) as fd: |
|
221 | 221 |
metadata = json.load(fd) |
222 | 222 |
filename = metadata.get('filename') |
223 | 223 |
content_type = metadata.get('content_type') |
passerelle/apps/csvdatasource/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0002_csvdatasource_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0003_auto_20160316_0910.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0004_auto_20160407_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0005_csvdatasource__dialect_options.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.contrib.postgres.fields.jsonb |
5 | 2 |
from django.db import migrations |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0006_auto_20160905_1031.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.contrib.postgres.fields.jsonb |
5 | 2 |
from django.db import migrations |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0007_query.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0008_auto_20161025_1156.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0009_auto_20161109_0353.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0010_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0011_auto_20180905_0936.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-09-05 14:36 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
import django.db.models.deletion |
passerelle/apps/csvdatasource/migrations/0012_auto_20180912_0215.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-09-12 07:15 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 | |
... | ... | |
14 | 12 |
operations = [ |
15 | 13 |
migrations.AlterUniqueTogether( |
16 | 14 |
name='tablerow', |
17 |
unique_together=set([('resource', 'line_number')]),
|
|
15 |
unique_together={('resource', 'line_number')},
|
|
18 | 16 |
), |
19 | 17 |
] |
passerelle/apps/csvdatasource/migrations/0013_auto_20181118_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/csvdatasource/migrations/0014_query_set_slug.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/apps/csvdatasource/migrations/0015_query_slug_unicity.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 | |
... | ... | |
13 | 10 |
operations = [ |
14 | 11 |
migrations.AlterUniqueTogether( |
15 | 12 |
name='query', |
16 |
unique_together=set([('resource', 'slug')]),
|
|
13 |
unique_together={('resource', 'slug')},
|
|
17 | 14 |
), |
18 | 15 |
] |
passerelle/apps/csvdatasource/migrations/0016_auto_20200406_1702.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-04-06 15:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/csvdatasource/migrations/0017_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations |
passerelle/apps/csvdatasource/migrations/0018_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/csvdatasource/migrations/0019_csv_upload_to.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
import passerelle.apps.csvdatasource.models |
passerelle/apps/csvdatasource/migrations/0020_csv_upload_to.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import os |
5 | 2 | |
6 | 3 |
from django.db import migrations |
passerelle/apps/csvdatasource/models.py | ||
---|---|---|
312 | 312 |
# if there was no row probably the data was not cached in database |
313 | 313 |
# yet. |
314 | 314 |
self.cache_data() |
315 |
for data in self.get_cached_rows(initial=False, model_filters=model_filters): |
|
316 |
yield data |
|
315 |
yield from self.get_cached_rows(initial=False, model_filters=model_filters) |
|
317 | 316 | |
318 | 317 |
@property |
319 | 318 |
def titles(self): |
... | ... | |
523 | 522 |
@classmethod |
524 | 523 |
def import_json_real(cls, overwrite, instance, d, **kwargs): |
525 | 524 |
queries = d.pop('queries', []) |
526 |
instance = super(CsvDataSource, cls).import_json_real(overwrite, instance, d, **kwargs)
|
|
525 |
instance = super().import_json_real(overwrite, instance, d, **kwargs) |
|
527 | 526 |
new = [] |
528 | 527 |
if instance and overwrite: |
529 | 528 |
Query.objects.filter(resource=instance).delete() |
passerelle/apps/esirius/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-03-01 14:52 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/family/management/commands/import_orleans_data.py | ||
---|---|---|
52 | 52 |
try: |
53 | 53 |
fd = open(lock_filename, 'w') # pylint: disable=consider-using-with |
54 | 54 |
fcntl.lockf(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) |
55 |
except IOError:
|
|
55 |
except OSError:
|
|
56 | 56 |
raise CommandError('Command already running.') |
57 | 57 | |
58 | 58 |
try: |
passerelle/apps/family/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/family/migrations/0002_auto_20161020_0426.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/family/migrations/0003_auto_20161021_0333.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/family/migrations/0004_invoice_paid.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/family/migrations/0005_invoice_online_payment.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/family/migrations/0006_invoice_no_online_payment_reason.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/family/migrations/0007_auto_20161122_1816.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import datetime |
5 | 2 | |
6 | 3 |
from django.db import migrations, models |
passerelle/apps/family/migrations/0008_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/family/migrations/0009_remove_genericfamily_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/family/migrations/0010_auto_20190209_0946.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.10 on 2019-02-09 15:46 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/family/migrations/0011_auto_20200803_2326.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-08-03 21:26 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/family/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# |
3 | 2 |
# passerelle - uniform access to multiple data sources and services |
4 | 3 |
# Copyright (C) 2016 Entr'ouvert |
passerelle/apps/feeds/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/feeds/migrations/0002_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/feeds/migrations/0003_remove_feed_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/gdc/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/gdc/migrations/0002_gdc_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/gdc/migrations/0003_auto_20160316_0910.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/gdc/migrations/0004_auto_20160407_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/gdc/migrations/0005_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/gdc/migrations/0006_remove_gdc_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/gdc/views.py | ||
---|---|---|
174 | 174 | |
175 | 175 |
try: |
176 | 176 |
resp = self.get_object().call_soap('addDemandeExterneParticulier', **kwargs) |
177 |
except IOError:
|
|
177 |
except OSError:
|
|
178 | 178 |
result = {'result': 'gdc soap crash'} |
179 | 179 |
else: |
180 | 180 |
code_retour = force_str(resp.findall('.//code_retour')[0].text) |
passerelle/apps/gesbac/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-09-19 15:23 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
import django.db.models.deletion |
passerelle/apps/gesbac/migrations/0002_auto_20200127_1317.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2020-01-27 12:17 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 | |
... | ... | |
25 | 23 |
), |
26 | 24 |
migrations.AlterUniqueTogether( |
27 | 25 |
name='form', |
28 |
unique_together=set([('form_id', 'counter')]),
|
|
26 |
unique_together={('form_id', 'counter')},
|
|
29 | 27 |
), |
30 | 28 |
] |
passerelle/apps/gesbac/migrations/0003_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/gesbac/migrations/0004_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/gesbac/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2019 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/apps/holidays/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2022 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/apps/jsondatastore/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.contrib.postgres.fields.jsonb |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/apps/jsondatastore/migrations/0002_jsondata_datastore.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/jsondatastore/migrations/0003_auto_20170623_1923.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/jsondatastore/migrations/0004_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/jsondatastore/migrations/0005_remove_jsondatastore_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/jsondatastore/migrations/0006_auto_20190325_1311.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-03-25 18:11 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/jsondatastore/migrations/0007_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations |
passerelle/apps/jsondatastore/migrations/0008_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/maelis/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2020-09-29 13:56 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
... | ... | |
64 | 62 |
), |
65 | 63 |
migrations.AlterUniqueTogether( |
66 | 64 |
name='link', |
67 |
unique_together=set([('resource', 'name_id')]),
|
|
65 |
unique_together={('resource', 'name_id')},
|
|
68 | 66 |
), |
69 | 67 |
] |
passerelle/apps/maelis/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2020 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/apps/maelis/utils.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2020 Entr'ouvert |
4 | 3 |
# |
... | ... | |
15 | 14 |
# You should have received a copy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 |
from __future__ import unicode_literals |
|
19 | 17 | |
20 | 18 |
import re |
21 | 19 |
from copy import copy, deepcopy |
passerelle/apps/mdel/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 | |
... | ... | |
65 | 62 |
), |
66 | 63 |
migrations.AlterUniqueTogether( |
67 | 64 |
name='demand', |
68 |
unique_together=set([('num', 'flow_type')]),
|
|
65 |
unique_together={('num', 'flow_type')},
|
|
69 | 66 |
), |
70 | 67 |
] |
passerelle/apps/mdel/migrations/0002_auto_20170123_0311.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/mdel/migrations/0003_auto_20170125_0450.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import datetime |
5 | 2 | |
6 | 3 |
from django.db import migrations, models |
passerelle/apps/mdel/migrations/0004_auto_20171220_1109.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/mdel/migrations/0005_remove_mdel_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:46 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/mdel/migrations/0006_auto_20210126_1440.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2021-01-26 13:40 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/mdel/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2016 Entr'ouvert |
4 | 3 |
# |
... | ... | |
263 | 262 |
# process address additional information |
264 | 263 |
adresse_complement = [] |
265 | 264 | |
266 |
complement_keys = sorted([key for key in formdata if key.startswith('adresse_complement')])
|
|
265 |
complement_keys = sorted(key for key in formdata if key.startswith('adresse_complement'))
|
|
267 | 266 | |
268 | 267 |
for key in complement_keys: |
269 | 268 |
adresse_complement.append(formdata[key]) |
passerelle/apps/mdel_ddpacs/abstract.py | ||
---|---|---|
1 |
# coding: utf-8 |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2019 Entr'ouvert |
4 | 3 |
# |
... | ... | |
15 | 14 |
# You should have received a copy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 |
from __future__ import unicode_literals |
|
19 | 17 | |
20 | 18 |
import inspect |
21 | 19 |
import os |
passerelle/apps/mdel_ddpacs/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-10-24 08:59 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
import django.db.models.deletion |
passerelle/apps/mdel_ddpacs/migrations/0002_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/mdel_ddpacs/migrations/0003_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/mdel_ddpacs/models.py | ||
---|---|---|
1 |
# coding: utf-8 |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2019 Entr'ouvert |
4 | 3 |
# |
... | ... | |
15 | 14 |
# You should have received a copy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 |
from __future__ import unicode_literals |
|
19 | 17 | |
20 | 18 |
import xmlschema |
21 | 19 |
from django.db import models |
passerelle/apps/mobyt/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.core.validators |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/apps/mobyt/migrations/0002_mobytsmsgateway_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/mobyt/migrations/0003_auto_20160316_0910.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/mobyt/migrations/0004_auto_20160407_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/mobyt/migrations/0005_mobytsmsgateway_default_trunk_prefix.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.core.validators |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/apps/mobyt/migrations/0006_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/mobyt/migrations/0007_auto_20181118_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/mobyt/migrations/0008_auto_20200310_1539.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-03-10 14:39 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/mobyt/migrations/0009_auto_20210202_1304.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-02-02 12:04 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/okina/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/okina/migrations/0002_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/okina/migrations/0003_remove_okina_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/opendatasoft/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-15 17:28 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
... | ... | |
97 | 95 |
), |
98 | 96 |
migrations.AlterUniqueTogether( |
99 | 97 |
name='query', |
100 |
unique_together=set([('resource', 'slug'), ('resource', 'name')]),
|
|
98 |
unique_together={('resource', 'slug'), ('resource', 'name')},
|
|
101 | 99 |
), |
102 | 100 |
] |
passerelle/apps/opendatasoft/migrations/0002_auto_20210625_1852.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2021-06-25 16:52 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/opendatasoft/migrations/0003_query_sort.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2021-06-25 17:01 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/opendatasoft/migrations/0004_query_limit.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2021-07-20 10:13 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/opendatasoft/models.py | ||
---|---|---|
56 | 56 |
@classmethod |
57 | 57 |
def import_json_real(cls, overwrite, instance, d, **kwargs): |
58 | 58 |
data_queries = d.pop('queries', []) |
59 |
instance = super(OpenDataSoft, cls).import_json_real(overwrite, instance, d, **kwargs)
|
|
59 |
instance = super().import_json_real(overwrite, instance, d, **kwargs) |
|
60 | 60 |
queries = [] |
61 | 61 |
if instance and overwrite: |
62 | 62 |
Query.objects.filter(resource=instance).delete() |
passerelle/apps/opengis/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/opengis/migrations/0002_auto_20171129_1814.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/opengis/migrations/0003_auto_20171220_1058.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/opengis/migrations/0004_auto_20180219_1613.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/opengis/migrations/0005_auto_20180227_1531.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/opengis/migrations/0006_auto_20181118_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/opengis/migrations/0007_auto_20200401_1032.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-04-08 09:54 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
... | ... | |
58 | 56 |
), |
59 | 57 |
migrations.AlterUniqueTogether( |
60 | 58 |
name='query', |
61 |
unique_together=set([('resource', 'name'), ('resource', 'slug')]),
|
|
59 |
unique_together={('resource', 'name'), ('resource', 'slug')},
|
|
62 | 60 |
), |
63 | 61 |
] |
passerelle/apps/opengis/migrations/0008_featurecache.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-04-01 09:21 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
import django.db.models.deletion |
passerelle/apps/opengis/migrations/0009_auto_20200407_1544.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-04-07 13:44 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/opengis/migrations/0010_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/opengis/migrations/0011_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/opengis/migrations/0012_query_indexing_template.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.17 on 2020-05-10 12:34 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/opengis/migrations/0013_remove_query_index_properties.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.17 on 2020-05-10 12:34 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/opengis/models.py | ||
---|---|---|
450 | 450 |
@classmethod |
451 | 451 |
def import_json_real(cls, overwrite, instance, d, **kwargs): |
452 | 452 |
queries = d.pop('queries', []) |
453 |
instance = super(OpenGIS, cls).import_json_real(overwrite, instance, d, **kwargs)
|
|
453 |
instance = super().import_json_real(overwrite, instance, d, **kwargs) |
|
454 | 454 |
new = [] |
455 | 455 |
if instance and overwrite: |
456 | 456 |
Query.objects.filter(resource=instance).delete() |
passerelle/apps/orange/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/orange/migrations/0002_orangesmsgateway_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/orange/migrations/0003_auto_20160316_0910.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/orange/migrations/0004_auto_20160407_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/orange/migrations/0005_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/orange/migrations/0006_remove_orangesmsgateway_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/orange/migrations/0007_auto_20200310_1539.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-03-10 14:39 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/orange/migrations/0008_auto_20200412_1240.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-04-12 10:40 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.core.validators |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/orange/migrations/0009_auto_20210202_1304.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-02-02 12:04 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/orange/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# |
4 | 3 |
# MIT License |
passerelle/apps/ovh/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.core.validators |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/apps/ovh/migrations/0002_ovhsmsgateway_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/ovh/migrations/0003_auto_20160316_0910.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/ovh/migrations/0004_auto_20160407_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/ovh/migrations/0005_ovhsmsgateway_default_trunk_prefix.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.core.validators |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/apps/ovh/migrations/0006_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/ovh/migrations/0007_auto_20181118_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/ovh/migrations/0008_ovhsmsgateway_max_message_length.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-03-10 14:39 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/ovh/migrations/0009_auto_20200730_1047.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-07-30 08:47 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/ovh/migrations/0010_auto_20201008_1126.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-10-08 09:26 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/ovh/migrations/0011_auto_20201026_1424.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-10-26 13:24 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/ovh/migrations/0012_auto_20201027_1121.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-10-27 10:21 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/ovh/migrations/0013_auto_20210202_1304.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-02-02 12:04 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/oxyd/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.core.validators |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/apps/oxyd/migrations/0002_oxydsmsgateway_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/oxyd/migrations/0003_auto_20160316_0910.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/oxyd/migrations/0004_auto_20160407_0456.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/oxyd/migrations/0005_oxydsmsgateway_default_trunk_prefix.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.core.validators |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/apps/oxyd/migrations/0006_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/oxyd/migrations/0007_auto_20181118_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/oxyd/migrations/0008_oxydsmsgateway_max_message_length.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-03-10 14:39 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/oxyd/migrations/0009_auto_20210202_1304.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-02-02 12:04 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/phonecalls/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.17 on 2019-01-21 14:14 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
import django.db.models.deletion |
passerelle/apps/phonecalls/migrations/0002_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/phonecalls/migrations/0003_phonecalls_redirect_url.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2020-11-13 10:35 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/photon/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-02-07 22:48 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/plone_restapi/models.py | ||
---|---|---|
79 | 79 |
@classmethod |
80 | 80 |
def import_json_real(cls, overwrite, instance, d, **kwargs): |
81 | 81 |
data_queries = d.pop('queries', []) |
82 |
instance = super(PloneRestApi, cls).import_json_real(overwrite, instance, d, **kwargs)
|
|
82 |
instance = super().import_json_real(overwrite, instance, d, **kwargs) |
|
83 | 83 |
queries = [] |
84 | 84 |
if instance and overwrite: |
85 | 85 |
Query.objects.filter(resource=instance).delete() |
passerelle/apps/sfr_dmc/models.py | ||
---|---|---|
21 | 21 |
from passerelle.sms.models import SMSResource |
22 | 22 |
from passerelle.utils.jsonresponse import APIError |
23 | 23 | |
24 |
GSM_CHARACTERS = set( |
|
25 |
[ |
|
26 |
chr(char) |
|
27 |
for char in [ |
|
28 |
# https://unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT |
|
29 |
# GSM 03.38 characters unicode values, in GSM encoding order |
|
30 |
# Unicode # char - GSM - Name |
|
31 |
0x0040, # @ - 0x00 - COMMERCIAL AT |
|
32 |
0x00A3, # £ - 0x01 - POUND SIGN |
|
33 |
0x0024, # $ - 0x02 - DOLLAR SIGN |
|
34 |
0x00A5, # ¥ - 0x03 - YEN SIGN |
|
35 |
0x00E8, # è - 0x04 - LATIN SMALL LETTER E WITH GRAVE |
|
36 |
0x00E9, # é - 0x05 - LATIN SMALL LETTER E WITH ACUTE |
|
37 |
0x00F9, # ù - 0x06 - LATIN SMALL LETTER U WITH GRAVE |
|
38 |
0x00EC, # ì - 0x07 - LATIN SMALL LETTER I WITH GRAVE |
|
39 |
0x00F2, # ò - 0x08 - LATIN SMALL LETTER O WITH GRAVE |
|
40 |
# According to the link up, GSM standard is ambiguous about weither |
|
41 |
# ç (0xE7) or Ç (0xC7) should be used at position 0x09 of GSM encoding |
|
42 |
# and suggest using ç. However, SFR API only accepts Ç and replaces |
|
43 |
# ç with c in non-unicode messages. |
|
44 |
0x00C7, # Ç - 0x09 - LATIN CAPITAL LETTER C WITH CEDILLA |
|
45 |
0x000A, # - 0x0A - LINE FEED |
|
46 |
0x00D8, # Ø - 0x0B - LATIN CAPITAL LETTER O WITH STROKE |
|
47 |
0x00F8, # ø - 0x0C - LATIN SMALL LETTER O WITH STROKE |
|
48 |
0x000D, # - 0x0D - CARRIAGE RETURN |
|
49 |
0x00C5, # Å - 0x0E - LATIN CAPITAL LETTER A WITH RING ABOVE |
|
50 |
0x00E5, # å - 0x0F - LATIN SMALL LETTER A WITH RING ABOVE |
|
51 |
0x0394, # Δ - 0x10 - GREEK CAPITAL LETTER DELTA |
|
52 |
0x005F, # _ - 0x11 - LOW LINE |
|
53 |
0x03A6, # Φ - 0x12 - GREEK CAPITAL LETTER PHI |
|
54 |
0x0393, # Γ - 0x13 - GREEK CAPITAL LETTER GAMMA |
|
55 |
0x039B, # Λ - 0x14 - GREEK CAPITAL LETTER LAMDA |
|
56 |
0x03A9, # Ω - 0x15 - GREEK CAPITAL LETTER OMEGA |
|
57 |
0x03A0, # Π - 0x16 - GREEK CAPITAL LETTER PI |
|
58 |
0x03A8, # Ψ - 0x17 - GREEK CAPITAL LETTER PSI |
|
59 |
0x03A3, # Σ - 0x18 - GREEK CAPITAL LETTER SIGMA |
|
60 |
0x0398, # Θ - 0x19 - GREEK CAPITAL LETTER THETA |
|
61 |
0x039E, # Ξ - 0x1A - GREEK CAPITAL LETTER XI |
|
62 |
0x00A0, # - 0x1B - NBSP (or escape character, see GSM 03.38 specification) |
|
63 |
0x00C6, # Æ - 0x1C - LATIN CAPITAL LETTER AE |
|
64 |
0x00E6, # æ - 0x1D - LATIN SMALL LETTER AE |
|
65 |
0x00DF, # ß - 0x1E - LATIN SMALL LETTER SHARP S (German) |
|
66 |
0x00C9, # É - 0x1F - LATIN CAPITAL LETTER E WITH ACUTE |
|
67 |
0x0020, # - 0x20 - SPACE |
|
68 |
0x0021, # ! - 0x21 - EXCLAMATION MARK |
|
69 |
0x0022, # " - 0x22 - QUOTATION MARK |
|
70 |
0x0023, # # - 0x23 - NUMBER SIGN |
|
71 |
0x00A4, # ¤ - 0x24 - CURRENCY SIGN |
|
72 |
0x0025, # % - 0x25 - PERCENT SIGN |
|
73 |
0x0026, # & - 0x26 - AMPERSAND |
|
74 |
0x0027, # ' - 0x27 - APOSTROPHE |
|
75 |
0x0028, # ( - 0x28 - LEFT PARENTHESIS |
|
76 |
0x0029, # ) - 0x29 - RIGHT PARENTHESIS |
|
77 |
0x002A, # * - 0x2A - ASTERISK |
|
78 |
0x002B, # + - 0x2B - PLUS SIGN |
|
79 |
0x002C, # , - 0x2C - COMMA |
|
80 |
0x002D, # - - 0x2D - HYPHEN-MINUS |
|
81 |
0x002E, # . - 0x2E - FULL STOP |
|
82 |
0x002F, # / - 0x2F - SOLIDUS |
|
83 |
0x0030, # 0 - 0x30 - DIGIT ZERO |
|
84 |
0x0031, # 1 - 0x31 - DIGIT ONE |
|
85 |
0x0032, # 2 - 0x32 - DIGIT TWO |
|
86 |
0x0033, # 3 - 0x33 - DIGIT THREE |
|
87 |
0x0034, # 4 - 0x34 - DIGIT FOUR |
|
88 |
0x0035, # 5 - 0x35 - DIGIT FIVE |
|
89 |
0x0036, # 6 - 0x36 - DIGIT SIX |
|
90 |
0x0037, # 7 - 0x37 - DIGIT SEVEN |
|
91 |
0x0038, # 8 - 0x38 - DIGIT EIGHT |
|
92 |
0x0039, # 9 - 0x39 - DIGIT NINE |
|
93 |
0x003A, # : - 0x3A - COLON |
|
94 |
0x003B, # ; - 0x3B - SEMICOLON |
|
95 |
0x003C, # < - 0x3C - LESS-THAN SIGN |
|
96 |
0x003D, # = - 0x3D - EQUALS SIGN |
|
97 |
0x003E, # > - 0x3E - GREATER-THAN SIGN |
|
98 |
0x003F, # ? - 0x3F - QUESTION MARK |
|
99 |
0x00A1, # ¡ - 0x40 - INVERTED EXCLAMATION MARK |
|
100 |
0x0041, # A - 0x41 - LATIN CAPITAL LETTER A |
|
101 |
0x0042, # B - 0x42 - LATIN CAPITAL LETTER B |
|
102 |
0x0043, # C - 0x43 - LATIN CAPITAL LETTER C |
|
103 |
0x0044, # D - 0x44 - LATIN CAPITAL LETTER D |
|
104 |
0x0045, # E - 0x45 - LATIN CAPITAL LETTER E |
|
105 |
0x0046, # F - 0x46 - LATIN CAPITAL LETTER F |
|
106 |
0x0047, # G - 0x47 - LATIN CAPITAL LETTER G |
|
107 |
0x0048, # H - 0x48 - LATIN CAPITAL LETTER H |
|
108 |
0x0049, # I - 0x49 - LATIN CAPITAL LETTER I |
|
109 |
0x004A, # J - 0x4A - LATIN CAPITAL LETTER J |
|
110 |
0x004B, # K - 0x4B - LATIN CAPITAL LETTER K |
|
111 |
0x004C, # L - 0x4C - LATIN CAPITAL LETTER L |
|
112 |
0x004D, # M - 0x4D - LATIN CAPITAL LETTER M |
|
113 |
0x004E, # N - 0x4E - LATIN CAPITAL LETTER N |
|
114 |
0x004F, # O - 0x4F - LATIN CAPITAL LETTER O |
|
115 |
0x0050, # P - 0x50 - LATIN CAPITAL LETTER P |
|
116 |
0x0051, # Q - 0x51 - LATIN CAPITAL LETTER Q |
|
117 |
0x0052, # R - 0x52 - LATIN CAPITAL LETTER R |
|
118 |
0x0053, # S - 0x53 - LATIN CAPITAL LETTER S |
|
119 |
0x0054, # T - 0x54 - LATIN CAPITAL LETTER T |
|
120 |
0x0055, # U - 0x55 - LATIN CAPITAL LETTER U |
|
121 |
0x0056, # V - 0x56 - LATIN CAPITAL LETTER V |
|
122 |
0x0057, # W - 0x57 - LATIN CAPITAL LETTER W |
|
123 |
0x0058, # X - 0x58 - LATIN CAPITAL LETTER X |
|
124 |
0x0059, # Y - 0x59 - LATIN CAPITAL LETTER Y |
|
125 |
0x005A, # Z - 0x5A - LATIN CAPITAL LETTER Z |
|
126 |
0x00C4, # Ä - 0x5B - LATIN CAPITAL LETTER A WITH DIAERESIS |
|
127 |
0x00D6, # Ö - 0x5C - LATIN CAPITAL LETTER O WITH DIAERESIS |
|
128 |
0x00D1, # Ñ - 0x5D - LATIN CAPITAL LETTER N WITH TILDE |
|
129 |
0x00DC, # Ü - 0x5E - LATIN CAPITAL LETTER U WITH DIAERESIS |
|
130 |
0x00A7, # § - 0x5F - SECTION SIGN |
|
131 |
0x00BF, # ¿ - 0x60 - INVERTED QUESTION MARK |
|
132 |
0x0061, # a - 0x61 - LATIN SMALL LETTER A |
|
133 |
0x0062, # b - 0x62 - LATIN SMALL LETTER B |
|
134 |
0x0063, # c - 0x63 - LATIN SMALL LETTER C |
|
135 |
0x0064, # d - 0x64 - LATIN SMALL LETTER D |
|
136 |
0x0065, # e - 0x65 - LATIN SMALL LETTER E |
|
137 |
0x0066, # f - 0x66 - LATIN SMALL LETTER F |
|
138 |
0x0067, # g - 0x67 - LATIN SMALL LETTER G |
|
139 |
0x0068, # h - 0x68 - LATIN SMALL LETTER H |
|
140 |
0x0069, # i - 0x69 - LATIN SMALL LETTER I |
|
141 |
0x006A, # j - 0x6A - LATIN SMALL LETTER J |
|
142 |
0x006B, # k - 0x6B - LATIN SMALL LETTER K |
|
143 |
0x006C, # l - 0x6C - LATIN SMALL LETTER L |
|
144 |
0x006D, # m - 0x6D - LATIN SMALL LETTER M |
|
145 |
0x006E, # n - 0x6E - LATIN SMALL LETTER N |
|
146 |
0x006F, # o - 0x6F - LATIN SMALL LETTER O |
|
147 |
0x0070, # p - 0x70 - LATIN SMALL LETTER P |
|
148 |
0x0071, # q - 0x71 - LATIN SMALL LETTER Q |
|
149 |
0x0072, # r - 0x72 - LATIN SMALL LETTER R |
|
150 |
0x0073, # s - 0x73 - LATIN SMALL LETTER S |
|
151 |
0x0074, # t - 0x74 - LATIN SMALL LETTER T |
|
152 |
0x0075, # u - 0x75 - LATIN SMALL LETTER U |
|
153 |
0x0076, # v - 0x76 - LATIN SMALL LETTER V |
|
154 |
0x0077, # w - 0x77 - LATIN SMALL LETTER W |
|
155 |
0x0078, # x - 0x78 - LATIN SMALL LETTER X |
|
156 |
0x0079, # y - 0x79 - LATIN SMALL LETTER Y |
|
157 |
0x007A, # z - 0x7A - LATIN SMALL LETTER Z |
|
158 |
0x00E4, # ä - 0x7B - LATIN SMALL LETTER A WITH DIAERESIS |
|
159 |
0x00F6, # ö - 0x7C - LATIN SMALL LETTER O WITH DIAERESIS |
|
160 |
0x00F1, # ñ - 0x7D - LATIN SMALL LETTER N WITH TILDE |
|
161 |
0x00FC, # ü - 0x7E - LATIN SMALL LETTER U WITH DIAERESIS |
|
162 |
0x00E0, # à - 0x7F - LATIN SMALL LETTER A WITH GRAVE |
|
163 |
# Greek upper case letters allowed by GSM 03.38, that will be mapped |
|
164 |
# to their latin equivalent |
|
165 |
0x0391, # Α - 0x41 - GREEK CAPITAL LETTER ALPHA |
|
166 |
0x0392, # Β - 0x42 - GREEK CAPITAL LETTER BETA |
|
167 |
0x0395, # Ε - 0x45 - GREEK CAPITAL LETTER EPSILON |
|
168 |
0x0397, # Η - 0x48 - GREEK CAPITAL LETTER ETA |
|
169 |
0x0399, # Ι - 0x49 - GREEK CAPITAL LETTER IOTA |
|
170 |
0x039A, # Κ - 0x4B - GREEK CAPITAL LETTER KAPPA |
|
171 |
0x039C, # Μ - 0x4D - GREEK CAPITAL LETTER MU |
|
172 |
0x039D, # Ν - 0x4E - GREEK CAPITAL LETTER NU |
|
173 |
0x039F, # Ο - 0x4F - GREEK CAPITAL LETTER OMICRON |
|
174 |
0x03A1, # Ρ - 0x50 - GREEK CAPITAL LETTER RHO |
|
175 |
0x03A4, # Τ - 0x54 - GREEK CAPITAL LETTER TAU |
|
176 |
0x03A7, # Χ - 0x58 - GREEK CAPITAL LETTER CHI |
|
177 |
0x03A5, # Υ - 0x59 - GREEK CAPITAL LETTER UPSILON |
|
178 |
0x0396, # Ζ - 0x5A - GREEK CAPITAL LETTER ZETA |
|
179 |
# GSM extension escape-sequence characters |
|
180 |
0x000C, # ␌ - 0x1B0A - FORM FEED |
|
181 |
0x005E, # ^ - 0x1B14 - CIRCUMFLEX ACCENT |
|
182 |
0x007B, # { - 0x1B28 - LEFT CURLY BRACKET |
|
183 |
0x007D, # } - 0x1B29 - RIGHT CURLY BRACKET |
|
184 |
0x005C, # \ - 0x1B2F - REVERSE SOLIDUS |
|
185 |
0x005B, # [ - 0x1B3C - LEFT SQUARE BRACKET |
|
186 |
0x007E, # ~ - 0x1B3D - TILDE |
|
187 |
0x005D, # ] - 0x1B3E - RIGHT SQUARE BRACKET |
|
188 |
0x007C, # | - 0x1B40 - VERTICAL LINE |
|
189 |
0x20AC, # € - 0x1B65 - EURO SIGN |
|
190 |
] |
|
24 |
GSM_CHARACTERS = { |
|
25 |
chr(char) |
|
26 |
for char in [ |
|
27 |
# https://unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT |
|
28 |
# GSM 03.38 characters unicode values, in GSM encoding order |
|
29 |
# Unicode # char - GSM - Name |
|
30 |
0x0040, # @ - 0x00 - COMMERCIAL AT |
|
31 |
0x00A3, # £ - 0x01 - POUND SIGN |
|
32 |
0x0024, # $ - 0x02 - DOLLAR SIGN |
|
33 |
0x00A5, # ¥ - 0x03 - YEN SIGN |
|
34 |
0x00E8, # è - 0x04 - LATIN SMALL LETTER E WITH GRAVE |
|
35 |
0x00E9, # é - 0x05 - LATIN SMALL LETTER E WITH ACUTE |
|
36 |
0x00F9, # ù - 0x06 - LATIN SMALL LETTER U WITH GRAVE |
|
37 |
0x00EC, # ì - 0x07 - LATIN SMALL LETTER I WITH GRAVE |
|
38 |
0x00F2, # ò - 0x08 - LATIN SMALL LETTER O WITH GRAVE |
|
39 |
# According to the link up, GSM standard is ambiguous about weither |
|
40 |
# ç (0xE7) or Ç (0xC7) should be used at position 0x09 of GSM encoding |
|
41 |
# and suggest using ç. However, SFR API only accepts Ç and replaces |
|
42 |
# ç with c in non-unicode messages. |
|
43 |
0x00C7, # Ç - 0x09 - LATIN CAPITAL LETTER C WITH CEDILLA |
|
44 |
0x000A, # - 0x0A - LINE FEED |
|
45 |
0x00D8, # Ø - 0x0B - LATIN CAPITAL LETTER O WITH STROKE |
|
46 |
0x00F8, # ø - 0x0C - LATIN SMALL LETTER O WITH STROKE |
|
47 |
0x000D, # - 0x0D - CARRIAGE RETURN |
|
48 |
0x00C5, # Å - 0x0E - LATIN CAPITAL LETTER A WITH RING ABOVE |
|
49 |
0x00E5, # å - 0x0F - LATIN SMALL LETTER A WITH RING ABOVE |
|
50 |
0x0394, # Δ - 0x10 - GREEK CAPITAL LETTER DELTA |
|
51 |
0x005F, # _ - 0x11 - LOW LINE |
|
52 |
0x03A6, # Φ - 0x12 - GREEK CAPITAL LETTER PHI |
|
53 |
0x0393, # Γ - 0x13 - GREEK CAPITAL LETTER GAMMA |
|
54 |
0x039B, # Λ - 0x14 - GREEK CAPITAL LETTER LAMDA |
|
55 |
0x03A9, # Ω - 0x15 - GREEK CAPITAL LETTER OMEGA |
|
56 |
0x03A0, # Π - 0x16 - GREEK CAPITAL LETTER PI |
|
57 |
0x03A8, # Ψ - 0x17 - GREEK CAPITAL LETTER PSI |
|
58 |
0x03A3, # Σ - 0x18 - GREEK CAPITAL LETTER SIGMA |
|
59 |
0x0398, # Θ - 0x19 - GREEK CAPITAL LETTER THETA |
|
60 |
0x039E, # Ξ - 0x1A - GREEK CAPITAL LETTER XI |
|
61 |
0x00A0, # - 0x1B - NBSP (or escape character, see GSM 03.38 specification) |
|
62 |
0x00C6, # Æ - 0x1C - LATIN CAPITAL LETTER AE |
|
63 |
0x00E6, # æ - 0x1D - LATIN SMALL LETTER AE |
|
64 |
0x00DF, # ß - 0x1E - LATIN SMALL LETTER SHARP S (German) |
|
65 |
0x00C9, # É - 0x1F - LATIN CAPITAL LETTER E WITH ACUTE |
|
66 |
0x0020, # - 0x20 - SPACE |
|
67 |
0x0021, # ! - 0x21 - EXCLAMATION MARK |
|
68 |
0x0022, # " - 0x22 - QUOTATION MARK |
|
69 |
0x0023, # # - 0x23 - NUMBER SIGN |
|
70 |
0x00A4, # ¤ - 0x24 - CURRENCY SIGN |
|
71 |
0x0025, # % - 0x25 - PERCENT SIGN |
|
72 |
0x0026, # & - 0x26 - AMPERSAND |
|
73 |
0x0027, # ' - 0x27 - APOSTROPHE |
|
74 |
0x0028, # ( - 0x28 - LEFT PARENTHESIS |
|
75 |
0x0029, # ) - 0x29 - RIGHT PARENTHESIS |
|
76 |
0x002A, # * - 0x2A - ASTERISK |
|
77 |
0x002B, # + - 0x2B - PLUS SIGN |
|
78 |
0x002C, # , - 0x2C - COMMA |
|
79 |
0x002D, # - - 0x2D - HYPHEN-MINUS |
|
80 |
0x002E, # . - 0x2E - FULL STOP |
|
81 |
0x002F, # / - 0x2F - SOLIDUS |
|
82 |
0x0030, # 0 - 0x30 - DIGIT ZERO |
|
83 |
0x0031, # 1 - 0x31 - DIGIT ONE |
|
84 |
0x0032, # 2 - 0x32 - DIGIT TWO |
|
85 |
0x0033, # 3 - 0x33 - DIGIT THREE |
|
86 |
0x0034, # 4 - 0x34 - DIGIT FOUR |
|
87 |
0x0035, # 5 - 0x35 - DIGIT FIVE |
|
88 |
0x0036, # 6 - 0x36 - DIGIT SIX |
|
89 |
0x0037, # 7 - 0x37 - DIGIT SEVEN |
|
90 |
0x0038, # 8 - 0x38 - DIGIT EIGHT |
|
91 |
0x0039, # 9 - 0x39 - DIGIT NINE |
|
92 |
0x003A, # : - 0x3A - COLON |
|
93 |
0x003B, # ; - 0x3B - SEMICOLON |
|
94 |
0x003C, # < - 0x3C - LESS-THAN SIGN |
|
95 |
0x003D, # = - 0x3D - EQUALS SIGN |
|
96 |
0x003E, # > - 0x3E - GREATER-THAN SIGN |
|
97 |
0x003F, # ? - 0x3F - QUESTION MARK |
|
98 |
0x00A1, # ¡ - 0x40 - INVERTED EXCLAMATION MARK |
|
99 |
0x0041, # A - 0x41 - LATIN CAPITAL LETTER A |
|
100 |
0x0042, # B - 0x42 - LATIN CAPITAL LETTER B |
|
101 |
0x0043, # C - 0x43 - LATIN CAPITAL LETTER C |
|
102 |
0x0044, # D - 0x44 - LATIN CAPITAL LETTER D |
|
103 |
0x0045, # E - 0x45 - LATIN CAPITAL LETTER E |
|
104 |
0x0046, # F - 0x46 - LATIN CAPITAL LETTER F |
|
105 |
0x0047, # G - 0x47 - LATIN CAPITAL LETTER G |
|
106 |
0x0048, # H - 0x48 - LATIN CAPITAL LETTER H |
|
107 |
0x0049, # I - 0x49 - LATIN CAPITAL LETTER I |
|
108 |
0x004A, # J - 0x4A - LATIN CAPITAL LETTER J |
|
109 |
0x004B, # K - 0x4B - LATIN CAPITAL LETTER K |
|
110 |
0x004C, # L - 0x4C - LATIN CAPITAL LETTER L |
|
111 |
0x004D, # M - 0x4D - LATIN CAPITAL LETTER M |
|
112 |
0x004E, # N - 0x4E - LATIN CAPITAL LETTER N |
|
113 |
0x004F, # O - 0x4F - LATIN CAPITAL LETTER O |
|
114 |
0x0050, # P - 0x50 - LATIN CAPITAL LETTER P |
|
115 |
0x0051, # Q - 0x51 - LATIN CAPITAL LETTER Q |
|
116 |
0x0052, # R - 0x52 - LATIN CAPITAL LETTER R |
|
117 |
0x0053, # S - 0x53 - LATIN CAPITAL LETTER S |
|
118 |
0x0054, # T - 0x54 - LATIN CAPITAL LETTER T |
|
119 |
0x0055, # U - 0x55 - LATIN CAPITAL LETTER U |
|
120 |
0x0056, # V - 0x56 - LATIN CAPITAL LETTER V |
|
121 |
0x0057, # W - 0x57 - LATIN CAPITAL LETTER W |
|
122 |
0x0058, # X - 0x58 - LATIN CAPITAL LETTER X |
|
123 |
0x0059, # Y - 0x59 - LATIN CAPITAL LETTER Y |
|
124 |
0x005A, # Z - 0x5A - LATIN CAPITAL LETTER Z |
|
125 |
0x00C4, # Ä - 0x5B - LATIN CAPITAL LETTER A WITH DIAERESIS |
|
126 |
0x00D6, # Ö - 0x5C - LATIN CAPITAL LETTER O WITH DIAERESIS |
|
127 |
0x00D1, # Ñ - 0x5D - LATIN CAPITAL LETTER N WITH TILDE |
|
128 |
0x00DC, # Ü - 0x5E - LATIN CAPITAL LETTER U WITH DIAERESIS |
|
129 |
0x00A7, # § - 0x5F - SECTION SIGN |
|
130 |
0x00BF, # ¿ - 0x60 - INVERTED QUESTION MARK |
|
131 |
0x0061, # a - 0x61 - LATIN SMALL LETTER A |
|
132 |
0x0062, # b - 0x62 - LATIN SMALL LETTER B |
|
133 |
0x0063, # c - 0x63 - LATIN SMALL LETTER C |
|
134 |
0x0064, # d - 0x64 - LATIN SMALL LETTER D |
|
135 |
0x0065, # e - 0x65 - LATIN SMALL LETTER E |
|
136 |
0x0066, # f - 0x66 - LATIN SMALL LETTER F |
|
137 |
0x0067, # g - 0x67 - LATIN SMALL LETTER G |
|
138 |
0x0068, # h - 0x68 - LATIN SMALL LETTER H |
|
139 |
0x0069, # i - 0x69 - LATIN SMALL LETTER I |
|
140 |
0x006A, # j - 0x6A - LATIN SMALL LETTER J |
|
141 |
0x006B, # k - 0x6B - LATIN SMALL LETTER K |
|
142 |
0x006C, # l - 0x6C - LATIN SMALL LETTER L |
|
143 |
0x006D, # m - 0x6D - LATIN SMALL LETTER M |
|
144 |
0x006E, # n - 0x6E - LATIN SMALL LETTER N |
|
145 |
0x006F, # o - 0x6F - LATIN SMALL LETTER O |
|
146 |
0x0070, # p - 0x70 - LATIN SMALL LETTER P |
|
147 |
0x0071, # q - 0x71 - LATIN SMALL LETTER Q |
|
148 |
0x0072, # r - 0x72 - LATIN SMALL LETTER R |
|
149 |
0x0073, # s - 0x73 - LATIN SMALL LETTER S |
|
150 |
0x0074, # t - 0x74 - LATIN SMALL LETTER T |
|
151 |
0x0075, # u - 0x75 - LATIN SMALL LETTER U |
|
152 |
0x0076, # v - 0x76 - LATIN SMALL LETTER V |
|
153 |
0x0077, # w - 0x77 - LATIN SMALL LETTER W |
|
154 |
0x0078, # x - 0x78 - LATIN SMALL LETTER X |
|
155 |
0x0079, # y - 0x79 - LATIN SMALL LETTER Y |
|
156 |
0x007A, # z - 0x7A - LATIN SMALL LETTER Z |
|
157 |
0x00E4, # ä - 0x7B - LATIN SMALL LETTER A WITH DIAERESIS |
|
158 |
0x00F6, # ö - 0x7C - LATIN SMALL LETTER O WITH DIAERESIS |
|
159 |
0x00F1, # ñ - 0x7D - LATIN SMALL LETTER N WITH TILDE |
|
160 |
0x00FC, # ü - 0x7E - LATIN SMALL LETTER U WITH DIAERESIS |
|
161 |
0x00E0, # à - 0x7F - LATIN SMALL LETTER A WITH GRAVE |
|
162 |
# Greek upper case letters allowed by GSM 03.38, that will be mapped |
|
163 |
# to their latin equivalent |
|
164 |
0x0391, # Α - 0x41 - GREEK CAPITAL LETTER ALPHA |
|
165 |
0x0392, # Β - 0x42 - GREEK CAPITAL LETTER BETA |
|
166 |
0x0395, # Ε - 0x45 - GREEK CAPITAL LETTER EPSILON |
|
167 |
0x0397, # Η - 0x48 - GREEK CAPITAL LETTER ETA |
|
168 |
0x0399, # Ι - 0x49 - GREEK CAPITAL LETTER IOTA |
|
169 |
0x039A, # Κ - 0x4B - GREEK CAPITAL LETTER KAPPA |
|
170 |
0x039C, # Μ - 0x4D - GREEK CAPITAL LETTER MU |
|
171 |
0x039D, # Ν - 0x4E - GREEK CAPITAL LETTER NU |
|
172 |
0x039F, # Ο - 0x4F - GREEK CAPITAL LETTER OMICRON |
|
173 |
0x03A1, # Ρ - 0x50 - GREEK CAPITAL LETTER RHO |
|
174 |
0x03A4, # Τ - 0x54 - GREEK CAPITAL LETTER TAU |
|
175 |
0x03A7, # Χ - 0x58 - GREEK CAPITAL LETTER CHI |
|
176 |
0x03A5, # Υ - 0x59 - GREEK CAPITAL LETTER UPSILON |
|
177 |
0x0396, # Ζ - 0x5A - GREEK CAPITAL LETTER ZETA |
|
178 |
# GSM extension escape-sequence characters |
|
179 |
0x000C, # ␌ - 0x1B0A - FORM FEED |
|
180 |
0x005E, # ^ - 0x1B14 - CIRCUMFLEX ACCENT |
|
181 |
0x007B, # { - 0x1B28 - LEFT CURLY BRACKET |
|
182 |
0x007D, # } - 0x1B29 - RIGHT CURLY BRACKET |
|
183 |
0x005C, # \ - 0x1B2F - REVERSE SOLIDUS |
|
184 |
0x005B, # [ - 0x1B3C - LEFT SQUARE BRACKET |
|
185 |
0x007E, # ~ - 0x1B3D - TILDE |
|
186 |
0x005D, # ] - 0x1B3E - RIGHT SQUARE BRACKET |
|
187 |
0x007C, # | - 0x1B40 - VERTICAL LINE |
|
188 |
0x20AC, # € - 0x1B65 - EURO SIGN |
|
191 | 189 |
] |
192 |
) |
|
190 |
} |
|
193 | 191 | |
194 | 192 | |
195 | 193 |
class SfrDmcGateway(SMSResource): |
passerelle/apps/signal_arretes/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2020 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/apps/solis/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/solis/migrations/0002_solisapalink_text.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/solis/migrations/0003_auto_20171219_0800.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
import passerelle.apps.solis.models |
passerelle/apps/solis/migrations/0004_auto_20171220_1058.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/solis/migrations/0005_remove_solis_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/apps/solis/migrations/0006_solisrsalink.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-05-09 07:18 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/solis/migrations/0007_solisrsalink_dob.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-01-27 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/apps/twilio/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-07-15 08:33 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.core.validators |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/twilio/migrations/0002_auto_20210202_1304.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-02-02 12:04 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields |
6 | 4 |
from django.db import migrations, models |
passerelle/apps/vivaticket/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/apps/vivaticket/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2019 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/base/management/commands/cron.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from __future__ import print_function |
|
18 | 17 | |
19 | 18 |
import traceback |
20 | 19 |
passerelle/base/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/base/migrations/0002_auto_20151009_0326.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/base/migrations/0003_auto_20170116_1656.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/base/migrations/0004_auto_20170117_0326.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 | |
... | ... | |
13 | 10 |
operations = [ |
14 | 11 |
migrations.AlterUniqueTogether( |
15 | 12 |
name='accessright', |
16 |
unique_together=set([('codename', 'resource_type', 'resource_pk', 'apiuser')]),
|
|
13 |
unique_together={('codename', 'resource_type', 'resource_pk', 'apiuser')},
|
|
17 | 14 |
), |
18 | 15 |
] |
passerelle/base/migrations/0005_resourcelog.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.contrib.postgres.fields.jsonb |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/base/migrations/0006_resourcestatus.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/base/migrations/0007_loggingparameters.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 13:16 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
passerelle/base/migrations/0008_auto_20181118_0717.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 13:17 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/base/migrations/0009_auto_20181118_0807.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-18 14:07 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 | |
... | ... | |
15 | 13 |
operations = [ |
16 | 14 |
migrations.AlterUniqueTogether( |
17 | 15 |
name='loggingparameters', |
18 |
unique_together=set([('resource_type', 'resource_pk')]),
|
|
16 |
unique_together={('resource_type', 'resource_pk')},
|
|
19 | 17 |
), |
20 | 18 |
] |
passerelle/base/migrations/0010_loggingparameters_trace_emails.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-25 13:55 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/base/migrations/0011_auto_20190205_1126.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.17 on 2019-02-05 10:26 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
... | ... | |
40 | 38 |
), |
41 | 39 |
migrations.AlterUniqueTogether( |
42 | 40 |
name='availabilityparameters', |
43 |
unique_together=set([('resource_type', 'resource_pk')]),
|
|
41 |
unique_together={('resource_type', 'resource_pk')},
|
|
44 | 42 |
), |
45 | 43 |
] |
passerelle/base/migrations/0012_job.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-02-20 09:00 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
import django.db.models.deletion |
passerelle/base/migrations/0013_delete_templatevar.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-06-02 13:56 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/base/migrations/0014_auto_20190820_0914.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-08-20 14:14 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/base/migrations/0015_auto_20190921_0347.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-09-21 08:47 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/base/migrations/0016_auto_20191002_1443.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2019-10-02 12:43 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/base/migrations/0017_auto_20200310_1806.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-03-10 17:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations, models |
passerelle/base/migrations/0018_smslog.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-03-10 17:26 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/base/migrations/0019_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/base/migrations/0020_auto_20200515_1923.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-15 17:23 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/base/migrations/0021_move_sms.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-19 09:03 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/base/migrations/0022_auto_20200715_1033.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-07-15 08:33 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/base/migrations/0023_loggingparameters_log_retention_days.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-11-03 11:16 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/base/migrations/0024_auto_20201103_1256.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-11-03 11:56 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/base/migrations/0025_transaction_id.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/base/migrations/0026_transaction_id.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/base/migrations/0027_transaction_id.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/base/migrations/0028_rename_permissions.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 |
passerelle/base/migrations/0029_auto_20210202_1627.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-02-02 15:27 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/base/templatetags/passerelle.py | ||
---|---|---|
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 | |
18 |
from __future__ import absolute_import, unicode_literals |
|
19 | ||
20 | 18 |
import collections |
21 | 19 |
import json |
22 | 20 |
import re |
passerelle/contrib/adict/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/adict/migrations/0002_auto_20171220_1104.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/adict/migrations/0003_remove_adict_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/caluire_axel/utils.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2021 Entr'ouvert |
4 | 3 |
# |
passerelle/contrib/dpark/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/dpark/migrations/0002_auto_20181119_1442.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/dpark/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2018 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
... | ... | |
14 | 13 |
# You should have received a copy of the GNU Affero General Public License |
15 | 14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 15 | |
17 |
from __future__ import unicode_literals |
|
18 | 16 | |
19 | 17 |
import base64 |
20 | 18 |
import datetime |
passerelle/contrib/esirius_swi/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2021 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/contrib/esirius_swi/utils.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2022 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/contrib/fake_family/default_database.py | ||
---|---|---|
1 |
# -*- encoding: utf-8 -*- |
|
2 | 1 |
# |
3 | 2 |
# passerelle - uniform access to multiple data sources and services |
4 | 3 |
# Copyright (C) 2015 Entr'ouvert |
passerelle/contrib/fake_family/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.contrib.postgres.fields.jsonb |
5 | 2 |
from django.db import migrations, models |
6 | 3 |
passerelle/contrib/fake_family/migrations/0002_fakefamily_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/fake_family/migrations/0003_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/fake_family/migrations/0004_remove_fakefamily_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/fake_family/migrations/0005_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations |
passerelle/contrib/fake_family/migrations/0006_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/fake_family/randomnames.py | ||
---|---|---|
1 |
# -*- encoding: utf-8 -*- |
|
2 | ||
3 | 1 |
import random |
4 | 2 | |
5 | 3 |
ADDRESS = [ |
passerelle/contrib/gdema/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/gdema/migrations/0002_auto_20181119_1446.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:46 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/grandlyon_streetsections/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/grandlyon_streetsections/migrations/0002_auto_20171220_1104.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/grandlyon_streetsections/migrations/0003_remove_grandlyonstreetsections_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/grandlyon_streetsections/migrations/0004_streetsection_codeinsee.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.17 on 2020-03-24 16:39 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/greco/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/greco/migrations/0002_auto_20171220_1104.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/greco/migrations/0003_remove_greco_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:46 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/grenoble_gru/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/grenoble_gru/migrations/0002_remove_grenoblegru_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:46 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/grenoble_gru/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2018 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
... | ... | |
169 | 168 |
cache_key = 'grenoble-gru-%s' % self.id |
170 | 169 |
if params: |
171 | 170 |
# compute new cache key based on params |
172 |
params_slug = '-'.join(sorted([slugify('%s-%s' % (k, v)) for k, v in params.items()]))
|
|
171 |
params_slug = '-'.join(sorted(slugify('%s-%s' % (k, v)) for k, v in params.items()))
|
|
173 | 172 |
cache_key = '%s-%s' % (cache_key, params_slug) |
174 | 173 |
xml_content = cache.get(cache_key) |
175 | 174 |
if not xml_content: |
passerelle/contrib/isere_ens/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2021-01-19 13:09 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/iws/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/iws/migrations/0002_remove_iwsconnector_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/lille_kimoce/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-05-13 08:21 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/lille_kimoce/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2019 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/contrib/lille_urban_card/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2019-06-12 05:57 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/lille_urban_card/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# |
3 | 2 |
# passerelle - uniform access to multiple data sources and services |
4 | 3 |
# Copyright (C) 2019 Entr'ouvert |
passerelle/contrib/mdph13/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.10 on 2019-02-15 09:57 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
... | ... | |
88 | 86 |
), |
89 | 87 |
migrations.AlterUniqueTogether( |
90 | 88 |
name='link', |
91 |
unique_together=set([('resource', 'name_id', 'file_number')]),
|
|
89 |
unique_together={('resource', 'name_id', 'file_number')},
|
|
92 | 90 |
), |
93 | 91 |
] |
passerelle/contrib/mdph13/migrations/0002_link_display_name.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.20 on 2019-03-11 10:05 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/mdph13/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2019 Entr'ouvert |
4 | 3 |
# |
... | ... | |
137 | 136 |
if not all(isinstance(demande.get('typologie'), str) for demande in demandes): |
138 | 137 |
raise APIError('typologie-must-be-a-string', data=content) |
139 | 138 |
if not all(demande['typologie'].lower() in typologies for demande in demandes): |
140 |
unknowns = set([demande['typologie'].lower() for demande in demandes]) - set( |
|
141 |
typologies.keys() |
|
142 |
) |
|
139 |
unknowns = {demande['typologie'].lower() for demande in demandes} - set(typologies.keys()) |
|
143 | 140 |
raise APIError( |
144 | 141 |
'typologie-is-unknown', |
145 | 142 |
data={ |
passerelle/contrib/nancypoll/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/nancypoll/migrations/0002_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/nancypoll/migrations/0003_remove_nancypoll_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:47 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/nancypoll/migrations/0004_csv_upload_to.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
import passerelle.contrib.nancypoll.models |
passerelle/contrib/nancypoll/migrations/0005_csv_upload_to.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import os |
5 | 2 | |
6 | 3 |
from django.db import migrations |
passerelle/contrib/planitech/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.15 on 2018-11-19 15:27 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/planitech/migrations/0002_planitechconnector_custom_fields.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.17 on 2019-01-08 11:22 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations |
passerelle/contrib/planitech/migrations/0003_pairing.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.17 on 2019-01-10 11:08 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.db.models.deletion |
6 | 4 |
from django.db import migrations, models |
... | ... | |
33 | 31 |
), |
34 | 32 |
migrations.AlterUniqueTogether( |
35 | 33 |
name='pairing', |
36 |
unique_together=set([('resource', 'name_id'), ('resource', 'external_id')]),
|
|
34 |
unique_together={('resource', 'name_id'), ('resource', 'external_id')},
|
|
37 | 35 |
), |
38 | 36 |
] |
passerelle/contrib/planitech/migrations/0004_auto_20190403_1938.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2019-04-03 17:38 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/planitech/migrations/0005_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/planitech/migrations/0006_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/rsa13/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2020-11-05 06:09 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/rsa13/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2019 Entr'ouvert |
4 | 3 |
# |
passerelle/contrib/sigerly/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-10-19 13:26 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/solis_afi_mss/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-10-19 10:15 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/solis_apa/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/solis_apa/migrations/0002_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/solis_apa/migrations/0003_auto_20181119_1447.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:47 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/solis_apa/models.py | ||
---|---|---|
294 | 294 |
'decision-commission': 'ExportSuiviDecisionCommission', |
295 | 295 |
} |
296 | 296 | |
297 |
uri = 'exportFlow?flow={}&application={}'.format(resource[suivi_type], APPLICATION)
|
|
297 |
uri = f'exportFlow?flow={resource[suivi_type]}&application={APPLICATION}'
|
|
298 | 298 | |
299 | 299 |
url = self.get_resource_url(uri) |
300 | 300 |
passerelle/contrib/strasbourg_eu/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.8 on 2018-02-19 18:46 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/strasbourg_eu/migrations/0002_remove_strasbourgeu_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/stub_invoices/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/stub_invoices/migrations/0002_stubinvoicesconnector_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/stub_invoices/migrations/0003_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/stub_invoices/migrations/0004_remove_stubinvoicesconnector_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/tcl/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/tcl/migrations/0002_auto_20170710_1725.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/tcl/migrations/0003_auto_20171220_1109.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/tcl/migrations/0004_auto_20180328_1123.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.8 on 2018-03-28 09:23 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/tcl/migrations/0005_remove_tcl_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/tcl/migrations/0006_auto_20200711_1209.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.17 on 2020-07-11 10:09 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/contrib/tcl/models.py | ||
---|---|---|
87 | 87 | |
88 | 88 |
stop['passings'].sort(key=lambda x: x['heurepassage']) |
89 | 89 |
stop['passings_by_line'] = sorted( |
90 |
[
|
|
90 |
(
|
|
91 | 91 |
{'ligne': v[0]['line_info']['ligne'], 'line_info': v[0]['line_info'], 'passings': v} |
92 | 92 |
for k, v in passings_by_line.items() |
93 |
],
|
|
93 |
),
|
|
94 | 94 |
key=lambda x: x['passings'][0]['heurepassage'], |
95 | 95 |
) |
96 | 96 |
passerelle/contrib/teamnet_axel/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/teamnet_axel/migrations/0002_management_billing_regies.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.contrib.postgres.fields.jsonb |
5 | 2 |
from django.db import migrations |
6 | 3 |
passerelle/contrib/teamnet_axel/migrations/0003_management_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/teamnet_axel/migrations/0004_auto_20170920_0951.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/teamnet_axel/migrations/0005_rename_model.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/teamnet_axel/migrations/0006_rename_model_2.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations, models |
5 | 2 | |
6 | 3 |
passerelle/contrib/teamnet_axel/migrations/0007_remove_teamnetaxel_log_level.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.12 on 2018-11-19 13:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/teamnet_axel/migrations/0008_auto_20200504_1402.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:02 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
from django.db import migrations, models |
passerelle/contrib/teamnet_axel/migrations/0009_text_to_jsonb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-04 12:06 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations |
6 | 4 |
passerelle/contrib/teamnet_axel/models.py | ||
---|---|---|
151 | 151 |
xml_individus = data.findall('PORTAIL/INDIVIDUS') |
152 | 152 |
if not xml_individus: |
153 | 153 |
raise APIError('PORTAIL/INDIVIDUS is empty') |
154 |
individus = [dict((k.lower(), v) for k, v in i.attrib.items()) for i in xml_individus]
|
|
154 |
individus = [{k.lower(): v for k, v in i.attrib.items()} for i in xml_individus]
|
|
155 | 155 |
for individu in individus: |
156 | 156 |
individu['id'] = individu['idindividu'] |
157 | 157 |
individu['text'] = '%(prenom)s %(nom)s' % individu |
... | ... | |
245 | 245 |
if not family_id: |
246 | 246 |
return {'data': []} |
247 | 247 |
invoices = self.get_teamnet_payable_invoices(regie_id, family_id) |
248 |
invoices = sorted([p for i, p in invoices.items()], key=lambda i: i['created'], reverse=True)
|
|
248 |
invoices = sorted((p for i, p in invoices.items()), key=lambda i: i['created'], reverse=True)
|
|
249 | 249 |
return {'data': invoices} |
250 | 250 | |
251 | 251 |
def get_teamnet_historical_invoices(self, regie_id, family_id): |
passerelle/contrib/toulouse_axel/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.db.models.deletion |
5 | 2 |
from django.db import migrations, models |
6 | 3 | |
... | ... | |
65 | 62 |
), |
66 | 63 |
migrations.AlterUniqueTogether( |
67 | 64 |
name='link', |
68 |
unique_together=set([('resource', 'name_id'), ('resource', 'name_id', 'dui', 'person_id')]),
|
|
65 |
unique_together={('resource', 'name_id'), ('resource', 'name_id', 'dui', 'person_id')},
|
|
69 | 66 |
), |
70 | 67 |
] |
passerelle/contrib/toulouse_axel/migrations/0002_auto_20191122_0946.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
from django.db import migrations |
5 | 2 | |
6 | 3 | |
... | ... | |
13 | 10 |
operations = [ |
14 | 11 |
migrations.AlterUniqueTogether( |
15 | 12 |
name='link', |
16 |
unique_together=set([('resource', 'name_id')]),
|
|
13 |
unique_together={('resource', 'name_id')},
|
|
17 | 14 |
), |
18 | 15 |
] |
passerelle/contrib/toulouse_axel/migrations/0003_auto_20191205_0948.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import django.db.models.deletion |
5 | 2 |
from django.db import migrations, models |
6 | 3 | |
... | ... | |
32 | 29 |
), |
33 | 30 |
migrations.AlterUniqueTogether( |
34 | 31 |
name='lock', |
35 |
unique_together=set([('resource', 'key')]),
|
|
32 |
unique_together={('resource', 'key')},
|
|
36 | 33 |
), |
37 | 34 |
] |
passerelle/contrib/toulouse_axel/models.py | ||
---|---|---|
284 | 284 |
def referential(self, request, code): |
285 | 285 |
if code not in ['situation_familiale', 'csp', 'lien_parente', 'type_regime', 'regime']: |
286 | 286 |
raise APIError('Referential not found', err_code='not-found') |
287 |
references = getattr(utils, '{}_mapping'.format(code))
|
|
287 |
references = getattr(utils, f'{code}_mapping')
|
|
288 | 288 |
if references is None: |
289 | 289 |
raise APIError('Referential not found', err_code='not-found', http_status=404) |
290 | 290 |
return {'data': [{'id': key, 'text': val} for key, val in references.items()]} |
... | ... | |
316 | 316 |
family_data['management_dates'] = self.get_management_dates() |
317 | 317 |
family_data['annee_reference'] = current_reference_year |
318 | 318 |
family_data['annee_reference_short'] = str(current_reference_year)[2:] |
319 |
family_data['annee_reference_label'] = '{}/{}'.format(current_reference_year, next_reference_year)
|
|
319 |
family_data['annee_reference_label'] = f'{current_reference_year}/{next_reference_year}'
|
|
320 | 320 | |
321 | 321 |
family_data['SITUATIONFAMILIALE_label'] = utils.get_label( |
322 | 322 |
utils.situation_familiale_mapping, family_data['SITUATIONFAMILIALE'] |
... | ... | |
1054 | 1054 |
) |
1055 | 1055 |
activity['annee_reference'] = reference_year |
1056 | 1056 |
activity['annee_reference_short'] = str(reference_year)[2:] |
1057 |
activity['annee_reference_label'] = '{}/{}'.format(reference_year, reference_year + 1)
|
|
1057 |
activity['annee_reference_label'] = f'{reference_year}/{reference_year + 1}'
|
|
1058 | 1058 |
activity['booking'] = booking_days.get(activity['IDACTIVITE'], {}) |
1059 | 1059 | |
1060 | 1060 |
cache.set(cache_key, child_activities, 30) # 30 seconds |
passerelle/contrib/toulouse_axel/utils.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2020 Entr'ouvert |
4 | 3 |
# |
... | ... | |
15 | 14 |
# You should have received a copy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 |
from __future__ import unicode_literals |
|
19 | 17 | |
20 | 18 |
import datetime |
21 | 19 |
from collections import OrderedDict |
passerelle/contrib/toulouse_maelis/models.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2022 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/contrib/toulouse_maelis/schemas.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2022 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
passerelle/contrib/toulouse_smart/migrations/0002_auto_20210806_1242.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2021-08-06 10:42 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import uuid |
6 | 4 |
passerelle/contrib/toulouse_smart/migrations/0003_smartrequest.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.29 on 2021-08-06 10:46 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
import django.contrib.postgres.fields.jsonb |
6 | 4 |
import django.db.models.deletion |
passerelle/contrib/utils/axel.py | ||
---|---|---|
56 | 56 |
if isinstance(tree, ET.ElementTree): |
57 | 57 |
tree = tree.getroot() |
58 | 58 |
if level < 0: |
59 |
raise ValueError("Initial indentation level must be >= 0, got {level}".format(level=level))
|
|
59 |
raise ValueError(f"Initial indentation level must be >= 0, got {level}")
|
|
60 | 60 |
if len(tree) == 0: |
61 | 61 |
return |
62 | 62 |
passerelle/sms/migrations/0001_initial.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Generated by Django 1.11.18 on 2020-05-19 09:03 |
3 |
from __future__ import unicode_literals |
|
4 | 2 | |
5 | 3 |
from django.db import migrations, models |
6 | 4 |
passerelle/sms/models.py | ||
---|---|---|
171 | 171 |
premium_numbers = set() |
172 | 172 |
if not self.allow_premium_rate: |
173 | 173 |
regex = re.compile('|'.join(number_regexes['premium_rate'])) |
174 |
premium_numbers = set(dest for dest in destinations if regex.match(dest))
|
|
174 |
premium_numbers = {dest for dest in destinations if regex.match(dest)}
|
|
175 | 175 | |
176 | 176 |
foreign_numbers = set() |
177 | 177 |
if SMSResource.ALL not in self.authorized: |
... | ... | |
179 | 179 |
for country in self.authorized: |
180 | 180 |
regexes += number_regexes[country] |
181 | 181 |
regex = re.compile('|'.join(regexes)) |
182 |
foreign_numbers = set(dest for dest in destinations if not regex.match(dest))
|
|
182 |
foreign_numbers = {dest for dest in destinations if not regex.match(dest)}
|
|
183 | 183 | |
184 | 184 |
authorized_numbers = sorted(set(destinations) - foreign_numbers - premium_numbers, key=int) |
185 | 185 |
passerelle/soap.py | ||
---|---|---|
13 | 13 |
for p in sd.ports: |
14 | 14 |
d['ports'][p[0].name] = {} |
15 | 15 |
for m in p[1]: |
16 |
d['ports'][p[0].name][m[0]] = dict((mp[0], sd.xlate(mp[1])) for mp in m[1])
|
|
16 |
d['ports'][p[0].name][m[0]] = {mp[0]: sd.xlate(mp[1]) for mp in m[1]}
|
|
17 | 17 |
d['types'] = {} |
18 | 18 |
for t in sd.types: |
19 | 19 |
ft = client.factory.create(sd.xlate(t[0])) |
passerelle/utils/__init__.py | ||
---|---|---|
13 | 13 |
# You should have received a copy of the GNU Affero General Public License |
14 | 14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 |
from __future__ import absolute_import |
|
17 | 16 | |
18 | 17 |
import base64 |
19 | 18 |
import hashlib |
passerelle/utils/api.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from __future__ import absolute_import |
|
18 | 17 | |
19 | 18 |
import inspect |
20 | 19 |
passerelle/utils/conversion.py | ||
---|---|---|
33 | 33 |
with warnings.catch_warnings(): |
34 | 34 |
warnings.simplefilter('error', Image.DecompressionBombWarning) |
35 | 35 |
image = Image.open(BytesIO(content)) |
36 |
except IOError:
|
|
36 |
except OSError:
|
|
37 | 37 |
raise ValueError('invalid image') |
38 | 38 |
except Image.DecompressionBombWarning: |
39 | 39 |
raise ValueError('unsafe image') |
passerelle/utils/json.py | ||
---|---|---|
29 | 29 |
# You should have received a copy of the GNU Affero General Public License |
30 | 30 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
31 | 31 | |
32 |
from __future__ import unicode_literals |
|
33 | 32 | |
34 | 33 |
from passerelle.utils.validation import is_number |
35 | 34 |
passerelle/utils/jsonresponse.py | ||
---|---|---|
2 | 2 |
# django-jsonresponse (https://github.com/jjay/django-jsonresponse) distributed |
3 | 3 |
# under BSD license |
4 | 4 | |
5 |
from __future__ import absolute_import |
|
6 | 5 | |
7 | 6 |
import datetime |
8 | 7 |
import functools |
passerelle/utils/sftp.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from __future__ import absolute_import |
|
18 | 17 | |
19 | 18 |
import contextlib |
20 | 19 |
import io |
passerelle/utils/wcs.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from __future__ import absolute_import |
|
18 | 17 | |
19 | 18 |
import base64 |
20 | 19 |
import collections |
... | ... | |
202 | 201 |
for status in self.statuses: |
203 | 202 |
status.startpoint = False |
204 | 203 |
self.statuses[0].startpoint = True |
205 |
self.statuses_map = dict((s.id, s) for s in self.statuses)
|
|
204 |
self.statuses_map = {s.id: s for s in self.statuses}
|
|
206 | 205 |
self.fields = [Field(wcs_api, **field) for field in (self.fields or [])] |
207 | 206 | |
208 | 207 | |
... | ... | |
244 | 243 |
offset = slice_or_id.start |
245 | 244 |
limit = slice_or_id.stop - slice_or_id.start |
246 | 245 | |
247 |
url_parts = ['api/forms/{self.formdef.slug}/list'.format(self=self)]
|
|
246 |
url_parts = [f'api/forms/{self.formdef.slug}/list']
|
|
248 | 247 |
query = {} |
249 | 248 |
query['full'] = 'on' if self._full else 'off' |
250 | 249 |
if offset: |
... | ... | |
263 | 262 |
return helper() |
264 | 263 |
# or get one form |
265 | 264 |
else: |
266 |
url_parts = ['api/forms/{formdef.slug}/{id}/'.format(formdef=self.formdef, id=slice_or_id)]
|
|
265 |
url_parts = [f'api/forms/{self.formdef.slug}/{slice_or_id}/']
|
|
267 | 266 |
if self.anonymize: |
268 | 267 |
url_parts.append('?anonymise=true') |
269 | 268 |
d = self.wcs_api.get_json(*url_parts) |
... | ... | |
298 | 297 |
start += self.batch |
299 | 298 | |
300 | 299 |
def __len__(self): |
301 |
return len(list((o for o in self)))
|
|
300 |
return len(list(o for o in self))
|
|
302 | 301 | |
303 | 302 | |
304 | 303 |
class CancelSubmitError(Exception): |
... | ... | |
360 | 359 | |
361 | 360 |
def _set_type_item(self, varname, field, value, **kwargs): |
362 | 361 |
if isinstance(value, dict): |
363 |
if not set(value).issuperset(set(['id', 'text'])):
|
|
362 |
if not set(value).issuperset({'id', 'text'}):
|
|
364 | 363 |
raise ValueError('item field value must have id and text value') |
365 | 364 |
# clean previous values |
366 | 365 |
self.data.pop(varname, None) |
... | ... | |
383 | 382 |
has_dict = False |
384 | 383 |
for choice in value: |
385 | 384 |
if isinstance(value, dict): |
386 |
if not set(value).issuperset(set(['id', 'text'])):
|
|
385 |
if not set(value).issuperset({'id', 'text'}):
|
|
387 | 386 |
raise ValueError('items field values must have id and text value') |
388 | 387 |
has_dict = True |
389 | 388 |
if has_dict: |
... | ... | |
412 | 411 |
elif isinstance(value, bytes): |
413 | 412 |
content = base64.b64encode(value) |
414 | 413 |
elif isinstance(value, dict): |
415 |
if not set(value).issuperset(set(['filename', 'content'])):
|
|
414 |
if not set(value).issuperset({'filename', 'content'}):
|
|
416 | 415 |
raise ValueError('file field needs a dict value with filename and content') |
417 | 416 |
content = value['content'] |
418 | 417 |
filename = value['filename'] |
... | ... | |
437 | 436 |
def _set_type_map(self, varname, field, value): |
438 | 437 |
if not isinstance(value, dict): |
439 | 438 |
raise TypeError('value must be a dict for a map field') |
440 |
if set(value) != set(['lat', 'lon']):
|
|
439 |
if set(value) != {'lat', 'lon'}:
|
|
441 | 440 |
raise ValueError('map field expect keys lat and lon') |
442 | 441 |
self.data[varname] = value |
443 | 442 | |
... | ... | |
517 | 516 |
yield self.object_class(wcs_api=self.wcs_api, **d) |
518 | 517 | |
519 | 518 |
def __len__(self): |
520 |
return len(list((o for o in self)))
|
|
519 |
return len(list(o for o in self))
|
|
521 | 520 | |
522 | 521 | |
523 | 522 |
class Roles(WcsObjects): |
passerelle/utils/zip.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from __future__ import absolute_import, unicode_literals |
|
18 | 17 | |
19 | 18 |
import difflib |
20 | 19 |
import io |
setup.py | ||
---|---|---|
31 | 31 |
tag exists, take 0.0- and add the length of the commit log. |
32 | 32 |
""" |
33 | 33 |
if os.path.exists('VERSION'): |
34 |
with open('VERSION', 'r') as v:
|
|
34 |
with open('VERSION') as v: |
|
35 | 35 |
return v.read() |
36 | 36 |
if os.path.exists('.git'): |
37 | 37 |
p = subprocess.Popen( |
tests/test_actesweb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2018 Entr'ouvert |
4 | 3 |
# |
... | ... | |
14 | 13 |
# |
15 | 14 |
# You should have received a.deepcopy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 |
from __future__ import unicode_literals |
|
18 | 16 | |
19 | 17 |
import io |
20 | 18 |
import json |
... | ... | |
33 | 31 | |
34 | 32 |
def get_file_from_test_base_dir(filename): |
35 | 33 |
path = os.path.join(get_test_base_dir('actesweb'), filename) |
36 |
with open(path, 'r') as fd:
|
|
34 |
with open(path) as fd: |
|
37 | 35 |
return fd.read() |
38 | 36 | |
39 | 37 | |
... | ... | |
60 | 58 | |
61 | 59 | |
62 | 60 |
def assert_file_content_values(filename, expectations): |
63 |
with io.open(filename, 'r', encoding='iso-8859-15') as fp:
|
|
61 |
with open(filename, 'r', encoding='iso-8859-15') as fp: |
|
64 | 62 |
for line in fp.readlines(): |
65 | 63 |
field, value = line.split('=') |
66 | 64 |
if field in expectations: |
tests/test_address.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
import json |
18 | 18 |
from io import StringIO |
19 |
from unittest import mock |
|
19 | 20 | |
20 |
import mock |
|
21 | 21 |
import pytest |
22 | 22 |
from django.core.files import File |
23 | 23 |
tests/test_adict.py | ||
---|---|---|
1 | 1 |
import json |
2 |
from unittest import mock |
|
2 | 3 | |
3 |
import mock |
|
4 | 4 |
import pytest |
5 | 5 | |
6 | 6 |
import tests.utils |
tests/test_airquality.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import freezegun |
4 | 2 |
import pytest |
5 | 3 |
from httmock import HTTMock, response |
tests/test_api.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
import mock |
|
17 |
from unittest import mock |
|
18 | ||
18 | 19 |
import pytest |
19 | 20 |
from django.contrib.contenttypes.models import ContentType |
20 | 21 |
from django.test import override_settings |
tests/test_api_entreprise.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
# tests/test_api_entreprise.py |
4 | 2 |
# Copyright (C) 2019 Entr'ouvert |
5 | 3 |
# |
... | ... | |
16 | 14 |
# You should have received a copy of the GNU Affero General Public License |
17 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 | 16 | |
19 |
import mock |
|
17 |
from unittest import mock |
|
18 | ||
20 | 19 |
import pytest |
21 | 20 |
import requests |
22 | 21 |
from django.utils import timezone |
tests/test_api_particulier.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
# tests/test_api_particulier.py |
4 | 2 |
# Copyright (C) 2017 Entr'ouvert |
5 | 3 |
# |
tests/test_arcgis.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
from __future__ import unicode_literals |
|
3 | ||
4 | 1 |
import json |
2 |
from unittest import mock |
|
5 | 3 | |
6 |
import mock |
|
7 | 4 |
import pytest |
8 | 5 |
from django.contrib.contenttypes.models import ContentType |
9 | 6 |
from django.core.exceptions import ValidationError |
tests/test_arpege_ecp.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import json |
2 |
from unittest import mock |
|
4 | 3 | |
5 |
import mock |
|
6 | 4 |
import pytest |
7 | 5 |
from django.urls import reverse |
8 | 6 |
tests/test_astech.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2021 Entr'ouvert |
4 | 3 |
# |
... | ... | |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 | 17 | |
19 |
import mock |
|
18 |
from unittest import mock |
|
19 | ||
20 | 20 |
import pytest |
21 | 21 |
from django.urls import reverse |
22 | 22 |
from requests import Request |
tests/test_astre_rest.py | ||
---|---|---|
178 | 178 |
params = { |
179 | 179 |
'file': { |
180 | 180 |
'filename': 'foo.txt', |
181 |
'content': base64.b64encode('aaaa'.encode('utf-8')).decode('utf-8'),
|
|
181 |
'content': base64.b64encode(b'aaaa').decode('utf-8'),
|
|
182 | 182 |
'content_type': 'text/plain', |
183 | 183 |
}, |
184 | 184 |
'entity_type': 'entitytype', |
... | ... | |
203 | 203 |
assert postvars['nomFichier'] == ['somefile.ext'] |
204 | 204 |
assert 'fichier' in postvars |
205 | 205 |
file_data = postvars['fichier'][0] |
206 |
assert file_data == 'aaaa'.encode('utf-8')
|
|
206 |
assert file_data == b'aaaa'
|
|
207 | 207 | |
208 | 208 |
json_resp = resp.json |
209 | 209 |
assert json_resp['err'] == 0 |
... | ... | |
288 | 288 |
params = { |
289 | 289 |
'file': { |
290 | 290 |
'filename': 'foo.txt', |
291 |
'content': base64.b64encode('aaaa'.encode('utf-8')).decode('utf-8'),
|
|
291 |
'content': base64.b64encode(b'aaaa').decode('utf-8'),
|
|
292 | 292 |
'content_type': 'text/plain', |
293 | 293 |
}, |
294 | 294 |
'entity_type': 'entitytype', |
... | ... | |
313 | 313 |
assert postvars['nomFichier'] == ['somefile.ext'] |
314 | 314 |
assert 'fichier' in postvars |
315 | 315 |
file_data = postvars['fichier'][0] |
316 |
assert file_data == 'aaaa'.encode('utf-8')
|
|
316 |
assert file_data == b'aaaa'
|
|
317 | 317 | |
318 | 318 |
json_resp = resp.json |
319 | 319 |
assert json_resp['err'] == 0 |
tests/test_astregs.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import logging |
4 | 2 |
import os |
5 | 3 |
import re |
4 |
from unittest import mock |
|
6 | 5 | |
7 |
import mock |
|
8 | 6 |
import pytest |
9 | 7 |
from django.utils.encoding import force_bytes, force_str |
10 | 8 |
from django.utils.http import urlencode |
tests/test_atal.py | ||
---|---|---|
1 |
# coding: utf-8 |
|
2 | ||
3 | 1 |
import base64 |
4 | 2 |
import os |
5 | 3 |
from datetime import datetime |
4 |
from unittest import mock |
|
6 | 5 | |
7 |
import mock |
|
8 | 6 |
import pytest |
9 | 7 |
from django.contrib.contenttypes.models import ContentType |
10 | 8 |
from django.utils.http import urlencode |
tests/test_atos_genesys.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import os |
4 | 2 |
import random |
3 |
from unittest import mock |
|
5 | 4 | |
6 |
import mock |
|
7 | 5 |
import pytest |
8 | 6 |
import requests |
9 | 7 |
from django.utils.http import urlencode |
tests/test_availability.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import pytest |
4 | 2 |
from httmock import HTTMock, all_requests |
5 | 3 |
tests/test_base_adresse.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import datetime |
4 | 2 |
import json |
5 | 3 |
import os |
4 |
from unittest import mock |
|
6 | 5 |
from urllib.parse import parse_qs, urljoin |
7 | 6 | |
8 |
import mock |
|
9 | 7 |
import pytest |
10 | 8 |
from django.core.management import call_command |
11 | 9 |
from django.core.management.base import CommandError |
... | ... | |
415 | 413 |
assert 'data' in resp.json |
416 | 414 |
assert resp.json['err'] == 0 |
417 | 415 |
assert len(resp.json['data']) == 20 |
418 |
assert set(street['zipcode'][:2] for street in resp.json['data']) == {'75'}
|
|
416 |
assert {street['zipcode'][:2] for street in resp.json['data']} == {'75'}
|
|
419 | 417 |
resp = app.get('/base-adresse/%s/streets?zipcode=75010' % base_adresse.slug) |
420 | 418 |
assert 'data' in resp.json |
421 | 419 |
assert resp.json['err'] == 0 |
... | ... | |
430 | 428 |
assert 'data' in resp.json |
431 | 429 |
assert resp.json['err'] == 0 |
432 | 430 |
assert len(resp.json['data']) == 20 |
433 |
assert set(street['citycode'][:2] for street in resp.json['data']) == {'75'}
|
|
431 |
assert {street['citycode'][:2] for street in resp.json['data']} == {'75'}
|
|
434 | 432 |
resp = app.get('/base-adresse/%s/streets?citycode=75044' % base_adresse.slug) |
435 | 433 |
assert 'data' in resp.json |
436 | 434 |
assert resp.json['err'] == 0 |
tests/test_bbb.py | ||
---|---|---|
15 | 15 | |
16 | 16 |
import datetime |
17 | 17 |
import uuid |
18 |
from unittest import mock |
|
18 | 19 | |
19 |
import mock |
|
20 | 20 |
import pytest |
21 | 21 | |
22 | 22 |
import passerelle.apps.bbb.utils as bbb_utils |
tests/test_caluire_axel.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2021 Entr'ouvert |
4 | 3 |
# |
... | ... | |
19 | 18 |
import os |
20 | 19 |
import xml.etree.ElementTree as ET |
21 | 20 |
from contextlib import contextmanager |
21 |
from unittest import mock |
|
22 | 22 | |
23 | 23 |
import freezegun |
24 |
import mock |
|
25 | 24 |
import pytest |
26 | 25 |
import xmlschema |
27 | 26 | |
... | ... | |
447 | 446 |
) |
448 | 447 |
with mock_data(content, 'FindIndividus'): |
449 | 448 |
resp = app.post_json('/caluire-axel/test/link?NameID=yyy', params=link_params) |
450 |
assert set(resp.json.keys()) == set(['err', 'link', 'created', 'family_id', 'data'])
|
|
449 |
assert set(resp.json.keys()) == {'err', 'link', 'created', 'family_id', 'data'}
|
|
451 | 450 |
assert resp.json['err'] == 0 |
452 | 451 |
assert resp.json['family_id'] == '12345' |
453 | 452 |
assert resp.json['created'] is True |
... | ... | |
457 | 456 |
# again |
458 | 457 |
with mock_data(content, 'FindIndividus'): |
459 | 458 |
resp = app.post_json('/caluire-axel/test/link?NameID=yyy', params=link_params) |
460 |
assert set(resp.json.keys()) == set(['err', 'link', 'created', 'family_id', 'data'])
|
|
459 |
assert set(resp.json.keys()) == {'err', 'link', 'created', 'family_id', 'data'}
|
|
461 | 460 |
assert resp.json['err'] == 0 |
462 | 461 |
assert resp.json['family_id'] == '12345' |
463 | 462 |
assert resp.json['created'] is False # link already exists |
... | ... | |
528 | 527 |
with mock_data(content, 'GetFamilleIndividus'): |
529 | 528 |
resp = app.get('/caluire-axel/test/family_info?NameID=yyy') |
530 | 529 |
assert resp.json['err'] == 0 |
531 |
assert set(resp.json['data'].keys()) == set( |
|
532 |
['family_id', 'CODE', 'MEMBRE', 'RESPONSABLE1', 'RESPONSABLE2'] |
|
533 |
) |
|
530 |
assert set(resp.json['data'].keys()) == {'family_id', 'CODE', 'MEMBRE', 'RESPONSABLE1', 'RESPONSABLE2'} |
|
534 | 531 |
assert resp.json['data']['CODE'] == 0 |
535 | 532 |
assert resp.json['data']['family_id'] == 'XXX' |
536 | 533 |
assert resp.json['data']['MEMBRE'][0]['id'] == '50632' |
... | ... | |
555 | 552 |
with mock_data(content, 'GetFamilleIndividus'): |
556 | 553 |
resp = app.get('/caluire-axel/test/family_info?NameID=bar') |
557 | 554 |
assert resp.json['err'] == 0 |
558 |
assert set(resp.json['data'].keys()) == set( |
|
559 |
['family_id', 'CODE', 'MEMBRE', 'RESPONSABLE1', 'RESPONSABLE2'] |
|
560 |
) |
|
555 |
assert set(resp.json['data'].keys()) == {'family_id', 'CODE', 'MEMBRE', 'RESPONSABLE1', 'RESPONSABLE2'} |
|
561 | 556 |
assert resp.json['data']['family_id'] == 'YYY' |
562 | 557 |
assert resp.json['data']['MEMBRE'][0]['id'] == '11111' |
563 | 558 |
assert resp.json['data']['MEMBRE'][0]['text'] == 'Enfant 1 CALUIRE TEST' |
... | ... | |
635 | 630 |
with mock_data(content, 'GetFamilleIndividus'): |
636 | 631 |
resp = app.get('/caluire-axel/test/child_info?NameID=yyy&idpersonne=50632') |
637 | 632 |
assert resp.json['err'] == 0 |
638 |
assert set(resp.json['data'].keys()) == set( |
|
639 |
[ |
|
640 |
'ADRESSE', |
|
641 |
'CIVILITE', |
|
642 |
'FAMILLE', |
|
643 |
'GARDEALTERNEE', |
|
644 |
'IDENT', |
|
645 |
'MAIL', |
|
646 |
'NAISSANCE', |
|
647 |
'NOM', |
|
648 |
'NOMJF', |
|
649 |
'PAI', |
|
650 |
'PRENOM', |
|
651 |
'SEXE', |
|
652 |
'TELFIXE', |
|
653 |
'TELPORTABLE', |
|
654 |
'id', |
|
655 |
'text', |
|
656 |
] |
|
657 |
) |
|
633 |
assert set(resp.json['data'].keys()) == { |
|
634 |
'ADRESSE', |
|
635 |
'CIVILITE', |
|
636 |
'FAMILLE', |
|
637 |
'GARDEALTERNEE', |
|
638 |
'IDENT', |
|
639 |
'MAIL', |
|
640 |
'NAISSANCE', |
|
641 |
'NOM', |
|
642 |
'NOMJF', |
|
643 |
'PAI', |
|
644 |
'PRENOM', |
|
645 |
'SEXE', |
|
646 |
'TELFIXE', |
|
647 |
'TELPORTABLE', |
|
648 |
'id', |
|
649 |
'text', |
|
650 |
} |
|
658 | 651 |
assert resp.json['data']['id'] == '50632' |
659 | 652 |
assert resp.json['data']['text'] == 'Enfant 1 CALUIRE TEST' |
660 | 653 | |
... | ... | |
682 | 675 |
'/caluire-axel/test/school_list?num=42&street=street=rue%20Pasteur&zipcode=69300&city=Caluire%20et%20Cuire&schooling_date=2021-05-10' |
683 | 676 |
) |
684 | 677 |
assert resp.json['err'] == 0 |
685 |
assert set(resp.json['data'].keys()) == set(['CODE', 'ECOLE'])
|
|
678 |
assert set(resp.json['data'].keys()) == {'CODE', 'ECOLE'}
|
|
686 | 679 |
assert len(resp.json['data']['ECOLE']) == 2 |
687 | 680 |
assert resp.json['data']['ECOLE'][0]['id'] == 'MAT' |
688 | 681 |
assert resp.json['data']['ECOLE'][0]['text'] == 'Ecole Maternelle' |
... | ... | |
757 | 750 |
'/caluire-axel/test/child_schooling_info?NameID=yyy&idpersonne=50632&schooling_date=2021-05-10' |
758 | 751 |
) |
759 | 752 |
assert resp.json['err'] == 0 |
760 |
assert set(resp.json['data'].keys()) == set(['CODE', 'INDIVIDU', 'SCOLAIRE'])
|
|
753 |
assert set(resp.json['data'].keys()) == {'CODE', 'INDIVIDU', 'SCOLAIRE'}
|
|
761 | 754 | |
762 | 755 | |
763 | 756 |
def test_child_activities_info_endpoint_axel_error(app, resource): |
... | ... | |
827 | 820 |
'/caluire-axel/test/child_activities_info?NameID=yyy&idpersonne=50632&schooling_date=2021-05-10' |
828 | 821 |
) |
829 | 822 |
assert resp.json['err'] == 0 |
830 |
assert set(resp.json['data'].keys()) == set(['CODE', 'ACTIVITE'])
|
|
823 |
assert set(resp.json['data'].keys()) == {'CODE', 'ACTIVITE'}
|
|
831 | 824 | |
832 | 825 |
# again - data are in cache |
833 | 826 |
with mock.patch( |
tests/test_cartads_cs.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import datetime |
4 | 2 |
import json |
5 | 3 |
import os |
6 | 4 |
from collections import OrderedDict |
5 |
from unittest import mock |
|
7 | 6 | |
8 |
import mock |
|
9 | 7 |
import pytest |
10 | 8 |
from django.test import override_settings |
11 | 9 |
from httmock import HTTMock |
... | ... | |
721 | 719 |
return {'content': json.dumps({'uuid': 'role-uuid'}), 'status_code': 200} |
722 | 720 |
elif url.path == '/api/roles/role-uuid/relationships/members/': |
723 | 721 |
body = json.loads(request.body) |
724 |
idp_mock.subscribed_roles = set([x['uuid'] for x in body['data']])
|
|
722 |
idp_mock.subscribed_roles = {x['uuid'] for x in body['data']}
|
|
725 | 723 |
return {'content': json.dumps({'err': 0}), 'status_code': 200} |
726 | 724 |
raise Exception('unhandled http call (%s)' % url) |
727 | 725 | |
... | ... | |
737 | 735 |
} |
738 | 736 |
): |
739 | 737 |
test_join(connector, app, cached_data) |
740 |
assert idp_mock.subscribed_roles == set(['2345', '3456']) |
|
738 |
assert idp_mock.subscribed_roles == {'2345', '3456'} |
tests/test_cityweb.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2017 Entr'ouvert |
4 | 3 |
# |
... | ... | |
14 | 13 |
# |
15 | 14 |
# You should have received a.deepcopy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 |
from __future__ import unicode_literals |
|
18 | 16 | |
19 | 17 |
import json |
20 | 18 |
import os |
... | ... | |
39 | 37 | |
40 | 38 |
def get_file_from_test_base_dir(filename): |
41 | 39 |
path = os.path.join(get_test_base_dir('cityweb'), filename) |
42 |
with open(path, 'r') as fd:
|
|
40 |
with open(path) as fd: |
|
43 | 41 |
return fd.read() |
44 | 42 | |
45 | 43 |
tests/test_clicrdv.py | ||
---|---|---|
1 |
from unittest import mock |
|
1 | 2 |
from urllib import parse as urlparse |
2 | 3 | |
3 |
import mock |
|
4 | 4 |
import pytest |
5 | 5 |
from django.contrib.contenttypes.models import ContentType |
6 | 6 |
from requests.exceptions import HTTPError |
tests/test_cmis.py | ||
---|---|---|
2 | 2 |
import os |
3 | 3 |
import re |
4 | 4 |
import xml.etree.ElementTree as ET |
5 |
from unittest import mock |
|
6 |
from unittest.mock import Mock, call |
|
5 | 7 |
from urllib import error as urllib2 |
6 | 8 | |
7 | 9 |
import httplib2 |
8 |
import mock |
|
9 | 10 |
import py |
10 | 11 |
import pytest |
11 | 12 |
from cmislib import CmisClient |
... | ... | |
19 | 20 |
from django.contrib.contenttypes.models import ContentType |
20 | 21 |
from django.urls import reverse |
21 | 22 |
from django.utils.encoding import force_bytes, force_str |
22 |
from mock import Mock, call |
|
23 | 23 | |
24 | 24 |
from passerelle.apps.cmis.models import CmisConnector |
25 | 25 |
from passerelle.base.models import AccessRight, ApiUser, ResourceLog |
... | ... | |
538 | 538 |
with open('%s/tests/data/cmis/cmis2.out.xml' % os.getcwd(), 'rb') as fd: |
539 | 539 |
content = fd.read() |
540 | 540 |
elif method == 'POST' and uri == 'http://example.com/cmisatom/test/children?id=L3Rlc3QtZW8%3D': |
541 |
with open('%s/tests/data/cmis/cmis3.in.xml' % os.getcwd(), 'r') as fd:
|
|
541 |
with open('%s/tests/data/cmis/cmis3.in.xml' % os.getcwd()) as fd: |
|
542 | 542 |
expected_input = fd.read() |
543 | 543 |
expected_input = expected_input.replace('\n', '') |
544 | 544 |
expected_input = re.sub('> *<', '><', expected_input) |
tests/test_cron.py | ||
---|---|---|
1 |
import mock |
|
1 |
from unittest import mock |
|
2 | ||
2 | 3 |
import pytest |
3 | 4 |
from django.core.management import call_command |
4 | 5 |
from django.core.management.base import CommandError |
tests/test_cryptor.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import base64 |
4 | 2 | |
5 | 3 |
import pytest |
tests/test_csv_datasource.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# |
3 | 2 |
# passerelle - uniform access to multiple data sources and services |
4 | 3 |
# Copyright (C) 2016 Entr'ouvert |
... | ... | |
24 | 23 |
from io import StringIO |
25 | 24 |
from posix import stat_result |
26 | 25 |
from stat import ST_MTIME |
26 |
from unittest import mock |
|
27 | 27 |
from urllib.parse import urlencode |
28 | 28 | |
29 |
import mock |
|
30 | 29 |
import pytest |
31 | 30 |
import webtest |
32 | 31 |
from django.contrib.contenttypes.models import ContentType |
tests/test_dpark.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
import base64 |
3 | 2 |
import os |
4 | 3 |
import xml.etree.ElementTree as ET |
4 |
from unittest import mock |
|
5 | 5 | |
6 | 6 |
import httmock |
7 |
import mock |
|
8 | 7 |
import pytest |
9 | 8 |
from django.utils.encoding import force_str |
10 | 9 |
from zeep.exceptions import Fault as WebFault |
tests/test_ensure_jsonbfields.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
from io import BytesIO |
4 | 2 | |
5 | 3 |
import pytest |
tests/test_esirius_swi.py | ||
---|---|---|
15 | 15 | |
16 | 16 |
import json |
17 | 17 |
import os |
18 |
from unittest import mock |
|
18 | 19 | |
19 |
import mock |
|
20 | 20 |
import pytest |
21 | 21 | |
22 | 22 |
import tests.utils |
tests/test_fake_family.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import pytest |
4 | 2 |
from django.urls import reverse |
5 | 3 |
tests/test_family.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import logging |
4 | 2 |
import os |
5 | 3 |
import shutil |
tests/test_feeds.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
1 |
from unittest import mock |
|
2 | 2 | |
3 |
import mock |
|
4 | 3 |
import pytest |
5 | 4 | |
6 | 5 |
import tests.utils |
tests/test_gdema.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
import json |
2 |
from unittest import mock |
|
3 | 3 | |
4 |
import mock |
|
5 | 4 |
import pytest |
6 | 5 |
from django.contrib.contenttypes.models import ContentType |
7 | 6 |
tests/test_generic_endpoint.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2015 Entr'ouvert |
4 | 3 |
# |
... | ... | |
15 | 14 |
# You should have received a copy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 |
from __future__ import unicode_literals |
|
19 | 17 | |
20 | 18 |
import copy |
21 | 19 |
import json |
22 | 20 |
import os |
23 | 21 |
import random |
24 | 22 |
import warnings |
23 |
from unittest import mock |
|
25 | 24 | |
26 |
import mock |
|
27 | 25 |
import pytest |
28 | 26 |
from django.urls import reverse |
29 | 27 |
tests/test_gesbac.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
# tests/test_gesbac.py |
4 | 2 |
# Copyright (C) 2019 Entr'ouvert |
5 | 3 |
# |
tests/test_greco.py | ||
---|---|---|
17 | 17 |
import os |
18 | 18 |
import xml.etree.ElementTree as ET |
19 | 19 |
from base64 import b64encode |
20 |
from unittest import mock |
|
20 | 21 | |
21 |
import mock |
|
22 | 22 |
import pytest |
23 | 23 |
from django.contrib.contenttypes.models import ContentType |
24 | 24 |
from django.urls import reverse |
tests/test_grenoble_gru.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2017 Entr'ouvert |
4 | 3 |
# |
... | ... | |
17 | 16 | |
18 | 17 |
import json |
19 | 18 |
import os |
19 |
from unittest import mock |
|
20 | 20 | |
21 |
import mock |
|
22 | 21 |
import pytest |
23 | 22 |
from django.urls import reverse |
24 | 23 |
tests/test_import_export.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
import json |
3 | 2 |
import os |
4 | 3 |
import sys |
tests/test_isere_ens.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2021 Entr'ouvert |
4 | 3 |
# |
... | ... | |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 | 17 | |
19 |
import mock |
|
18 |
from unittest import mock |
|
19 | ||
20 | 20 |
import pytest |
21 | 21 |
from django.urls import reverse |
22 | 22 |
tests/test_iws.py | ||
---|---|---|
1 |
from unittest.mock import Mock |
|
2 | ||
1 | 3 |
import pytest |
2 | 4 |
from django.contrib.contenttypes.models import ContentType |
3 |
from mock import Mock |
|
4 | 5 | |
5 | 6 |
from passerelle.base.models import AccessRight, ApiUser |
6 | 7 |
from passerelle.contrib.iws.models import IWSConnector |
tests/test_jobs.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import datetime |
4 | 2 |
import os |
3 |
from unittest import mock |
|
5 | 4 | |
6 | 5 |
import isodate |
7 |
import mock |
|
8 | 6 |
import pytest |
9 | 7 |
from django.core.management import call_command |
10 | 8 |
from django.core.management.base import CommandError |
tests/test_jsondatastore.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import pytest |
4 | 2 |
from django.contrib.contenttypes.models import ContentType |
5 | 3 |
from django.core.serializers.json import DjangoJSONEncoder |
... | ... | |
218 | 216 |
assert [d['id'] for d in resp.json['data']] == [uuid1] |
219 | 217 | |
220 | 218 |
resp = app.get('/jsondatastore/foobar/data/', params={'key1': 'val1', 'key2': 'val2'}) |
221 |
assert sorted([d['id'] for d in resp.json['data']]) == sorted([uuid2, uuid3])
|
|
219 |
assert sorted(d['id'] for d in resp.json['data']) == sorted([uuid2, uuid3])
|
|
222 | 220 | |
223 | 221 |
resp = app.get('/jsondatastore/foobar/data/?name_id=name1', params={'key2': 'val2'}) |
224 | 222 |
assert [d['id'] for d in resp.json['data']] == [uuid3] |
... | ... | |
237 | 235 |
resp = app.post_json('/jsondatastore/foobar/data/create', params={'foo': 'ras'}) |
238 | 236 | |
239 | 237 |
resp = app.get('/jsondatastore/foobar/data/', params={'q': 'àR'}) |
240 |
assert sorted([d['id'] for d in resp.json['data']]) == sorted([uuid1, uuid2])
|
|
238 |
assert sorted(d['id'] for d in resp.json['data']) == sorted([uuid1, uuid2])
|
|
241 | 239 | |
242 | 240 |
resp = app.get('/jsondatastore/foobar/data/', params={'q': 'na'}) |
243 | 241 |
assert resp.json['data'] == [] |
tests/test_lille_kimoce.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2019 Entr'ouvert |
4 | 3 |
# |
... | ... | |
17 | 16 | |
18 | 17 | |
19 | 18 |
import json |
19 |
from unittest import mock |
|
20 | 20 | |
21 |
import mock |
|
22 | 21 |
import pytest |
23 | 22 |
from django.urls import reverse |
24 | 23 |
tests/test_lille_urban_card.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import json |
2 |
from unittest import mock |
|
4 | 3 | |
5 |
import mock |
|
6 | 4 |
import pytest |
7 | 5 |
from httmock import HTTMock |
8 | 6 |
tests/test_maelis.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import json |
4 | 2 |
import os |
3 |
from unittest import mock |
|
5 | 4 | |
6 |
import mock |
|
7 | 5 |
import pytest |
8 | 6 |
from django.test import override_settings |
9 | 7 |
from django.utils.dateparse import parse_date |
tests/test_mdel.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2015 Entr'ouvert |
4 | 3 |
# |
... | ... | |
14 | 13 |
# |
15 | 14 |
# You should have received a.deepcopy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 |
from __future__ import unicode_literals |
|
18 | 16 | |
19 | 17 |
import base64 |
20 | 18 |
import copy |
tests/test_mdel_ddpacs.py | ||
---|---|---|
1 |
# coding: utf-8 |
|
2 | 1 |
# Passerelle - uniform access to data and services |
3 | 2 |
# Copyright (C) 2019 Entr'ouvert |
4 | 3 |
# |
... | ... | |
15 | 14 |
# You should have received a.deepcopy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 |
from __future__ import unicode_literals |
|
19 | 17 | |
20 | 18 |
import io |
21 | 19 |
import logging |
tests/test_mdph13.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2018 Entr'ouvert |
4 | 3 |
# |
tests/test_misc.py | ||
---|---|---|
1 | 1 |
import datetime |
2 | 2 |
from io import StringIO |
3 |
from unittest import mock |
|
4 |
from unittest.mock import patch |
|
3 | 5 | |
4 |
import mock |
|
5 | 6 |
import pytest |
6 | 7 |
from django.contrib.contenttypes.models import ContentType |
7 | 8 |
from django.core.files import File |
... | ... | |
9 | 10 |
from django.db.migrations.executor import MigrationExecutor |
10 | 11 |
from django.urls import reverse |
11 | 12 |
from django.utils import timezone |
12 |
from mock import patch |
|
13 | 13 |
from requests.exceptions import ReadTimeout |
14 | 14 | |
15 | 15 |
from passerelle.apps.base_adresse.models import BaseAdresse |
tests/test_okina.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
import json |
2 |
from unittest import mock |
|
3 | 3 | |
4 |
import mock |
|
5 | 4 |
import pytest |
6 | 5 |
from django.contrib.contenttypes.models import ContentType |
7 | 6 |
tests/test_opendatasoft.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2020 Entr'ouvert |
4 | 3 |
# |
... | ... | |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 | 17 |
import json |
18 |
from unittest import mock |
|
19 | 19 | |
20 |
import mock |
|
21 | 20 |
import pytest |
22 | 21 |
from requests.exceptions import ConnectionError |
23 | 22 |
tests/test_opengis.py | ||
---|---|---|
1 | 1 |
import json |
2 |
from unittest import mock |
|
2 | 3 | |
3 |
import mock |
|
4 | 4 |
import pytest |
5 | 5 |
from django.core.management import call_command |
6 | 6 | |
... | ... | |
862 | 862 |
radius = 5000 |
863 | 863 | |
864 | 864 |
bbox = Query.get_bbox_containing_circle(center_lon, center_lat, float(radius)) |
865 |
resp = app.get(endpoint + '?bbox=' + ','.join((str(x) for x in bbox)))
|
|
865 |
resp = app.get(endpoint + '?bbox=' + ','.join(str(x) for x in bbox))
|
|
866 | 866 |
features = resp.json['features'] |
867 | 867 |
assert len(features) == 4 |
868 | 868 |
assert all(feature['properties']['in-circle'] or feature['properties']['in-bbox'] for feature in features) |
tests/test_orange.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2020 Entr'ouvert |
4 | 3 |
# |
tests/test_photon.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
import datetime |
18 | 18 |
import json |
19 |
from unittest import mock |
|
19 | 20 | |
20 |
import mock |
|
21 | 21 |
import pytest |
22 | 22 |
from httmock import HTTMock, remember_called, response, urlmatch |
23 | 23 |
from requests.exceptions import ConnectionError, HTTPError |
tests/test_planitech.py | ||
---|---|---|
1 | 1 |
import collections |
2 | 2 |
from datetime import datetime |
3 |
from unittest import mock |
|
3 | 4 | |
4 |
import mock |
|
5 | 5 |
import pytest |
6 | 6 |
import requests |
7 | 7 |
from django.contrib.contenttypes.models import ContentType |
tests/test_plone_restapi.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 202 Entr'ouvert |
4 | 3 |
# |
tests/test_proxylogger.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import datetime |
4 | 2 |
import itertools |
5 | 3 |
import logging |
tests/test_requests.py | ||
---|---|---|
1 | 1 |
import logging |
2 |
from unittest import mock |
|
2 | 3 | |
3 |
import mock |
|
4 | 4 |
import mohawk |
5 | 5 |
import pytest |
6 | 6 |
import requests |
tests/test_rsa13.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2018 Entr'ouvert |
4 | 3 |
# |
tests/test_signal_arretes.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
import json |
18 | 18 |
from base64 import standard_b64encode |
19 |
from unittest.mock import patch |
|
19 | 20 | |
20 | 21 |
import pytest |
21 | 22 |
from httmock import HTTMock, response, urlmatch |
22 |
from mock import patch |
|
23 | 23 | |
24 | 24 |
from passerelle.apps.signal_arretes.models import SignalArretes |
25 | 25 |
from tests.utils import generic_endpoint_url, setup_access_rights |
... | ... | |
82 | 82 |
return response(200, json.dumps({'GetStatutDemandeResult': json.dumps('Enregistré')})) |
83 | 83 | |
84 | 84 | |
85 |
DOCUMENT_CONTENT = 'Test file content'.encode('utf-8')
|
|
85 |
DOCUMENT_CONTENT = b'Test file content'
|
|
86 | 86 | |
87 | 87 | |
88 | 88 |
@urlmatch(netloc='^sa.net$', path='^/CreationDemandeService.svc/GetDocumentDemande/.*') |
tests/test_sivin.py | ||
---|---|---|
14 | 14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 | 16 |
import json |
17 |
from unittest import mock |
|
17 | 18 | |
18 |
import mock |
|
19 | 19 |
import pytest |
20 | 20 |
from django.contrib.contenttypes.models import ContentType |
21 | 21 |
from django.urls import reverse |
tests/test_sms.py | ||
---|---|---|
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 |
import json |
17 | 17 |
import logging |
18 |
from unittest import mock |
|
18 | 19 | |
19 |
import mock |
|
20 | 20 |
import pytest |
21 | 21 |
from django.contrib.contenttypes.models import ContentType |
22 | 22 |
from django.urls import reverse |
tests/test_solis.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
from io import StringIO |
2 |
from unittest import mock |
|
4 | 3 | |
5 |
import mock |
|
6 | 4 |
import pytest |
7 | 5 |
from django.contrib.contenttypes.models import ContentType |
8 | 6 |
from django.core.files import File |
... | ... | |
479 | 477 |
assert len(resp.json['data']) == 2 |
480 | 478 |
assert requests_post.call_count == 2 |
481 | 479 |
assert requests_get.call_count == 2 |
482 |
assert set([x['id'] for x in resp.json['data']]) == set(['42', '53'])
|
|
480 |
assert {x['id'] for x in resp.json['data']} == {'42', '53'}
|
|
483 | 481 |
assert resp.json['data'][0]['text'] == 'Mme Pecile PEPPYNE (NPYNEZ)' |
484 | 482 |
# user "text" updated in links: |
485 | 483 |
assert [x['text'] for x in SolisAPALink.objects.values('text')] == [ |
... | ... | |
751 | 749 |
assert resp.json['err'] == 0 |
752 | 750 |
assert resp.json['data'] is None |
753 | 751 |
assert resp.json['files_sent'] == {'id': 'foo', 'nbFichiersAcceptes': 3} |
754 |
assert set(resp.json['files_failed_pdf_conversion']) == set( |
|
755 |
['etat_civil_004.pdf', 'etat_civil_005.pdf', 'etat_civil_006.pdf'] |
|
756 |
) |
|
752 |
assert set(resp.json['files_failed_pdf_conversion']) == { |
|
753 |
'etat_civil_004.pdf', |
|
754 |
'etat_civil_005.pdf', |
|
755 |
'etat_civil_006.pdf', |
|
756 |
} |
|
757 | 757 | |
758 | 758 |
# invalid inputs |
759 | 759 |
requests_post.reset_mock() |
tests/test_solis_afi_mss.py | ||
---|---|---|
17 | 17 |
import base64 |
18 | 18 |
import json |
19 | 19 |
import os |
20 |
from unittest import mock |
|
20 | 21 | |
21 |
import mock |
|
22 | 22 |
import pytest |
23 | 23 |
from django.utils.encoding import force_str |
24 | 24 |
tests/test_solis_apa.py | ||
---|---|---|
2 | 2 |
import json |
3 | 3 |
import os |
4 | 4 |
from decimal import Decimal |
5 |
from unittest import mock |
|
5 | 6 | |
6 |
import mock |
|
7 | 7 |
import pytest |
8 | 8 |
from django.contrib.contenttypes.models import ContentType |
9 | 9 |
from django.urls import reverse |
tests/test_strasbourg_eu.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | ||
3 | 1 |
import pytest |
4 | 2 |
from django.contrib.contenttypes.models import ContentType |
5 | 3 |
from httmock import HTTMock |
tests/test_tcl.py | ||
---|---|---|
1 | 1 |
import copy |
2 |
from unittest import mock |
|
2 | 3 |
from urllib import parse as urlparse |
3 | 4 | |
4 |
import mock |
|
5 | 5 |
import pytest |
6 | 6 | |
7 | 7 |
import tests.utils |
tests/test_teamnet_axel.py | ||
---|---|---|
1 |
import mock |
|
1 |
from unittest import mock |
|
2 | ||
2 | 3 |
import pytest |
3 | 4 |
from requests.exceptions import ConnectionError |
4 | 5 |
tests/test_toulouse_axel.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2020 Entr'ouvert |
4 | 3 |
# |
... | ... | |
15 | 14 |
# You should have received a copy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 |
from __future__ import unicode_literals |
|
19 | 17 | |
20 | 18 |
import copy |
21 | 19 |
import datetime |
... | ... | |
24 | 22 |
import os |
25 | 23 |
import xml.etree.ElementTree as ET |
26 | 24 |
from contextlib import contextmanager |
25 |
from unittest import mock |
|
27 | 26 | |
28 | 27 |
import freezegun |
29 | 28 |
import jsonschema |
30 |
import mock |
|
31 | 29 |
import pytest |
32 | 30 |
import xmlschema |
33 | 31 |
from django.core.cache import cache |
... | ... | |
544 | 542 |
</PORTAIL>''' |
545 | 543 |
with mock_getdata(content, 'RefDateGestionDui'): |
546 | 544 |
resp = app.get('/toulouse-axel/test/management_dates') |
547 |
assert set(resp.json.keys()) == set(['err', 'data'])
|
|
545 |
assert set(resp.json.keys()) == {'err', 'data'}
|
|
548 | 546 |
assert resp.json['err'] == 0 |
549 |
assert set(resp.json['data'].keys()) == set( |
|
550 |
[ |
|
551 |
'REPORT-REVENUS', |
|
552 |
'report_revenus', |
|
553 |
'EXTRACTION-FAMILLES', |
|
554 |
'extraction_familles', |
|
555 |
'EXTRACTION-CAFPRO', |
|
556 |
'extraction_cafpro', |
|
557 |
] |
|
558 |
) |
|
547 |
assert set(resp.json['data'].keys()) == { |
|
548 |
'REPORT-REVENUS', |
|
549 |
'report_revenus', |
|
550 |
'EXTRACTION-FAMILLES', |
|
551 |
'extraction_familles', |
|
552 |
'EXTRACTION-CAFPRO', |
|
553 |
'extraction_cafpro', |
|
554 |
} |
|
559 | 555 | |
560 | 556 |
# again - data are in cache |
561 | 557 |
resp = app.get('/toulouse-axel/test/management_dates') |
562 |
assert set(resp.json.keys()) == set(['err', 'data'])
|
|
558 |
assert set(resp.json.keys()) == {'err', 'data'}
|
|
563 | 559 |
assert resp.json['err'] == 0 |
564 |
assert set(resp.json['data'].keys()) == set( |
|
565 |
[ |
|
566 |
'REPORT-REVENUS', |
|
567 |
'report_revenus', |
|
568 |
'EXTRACTION-FAMILLES', |
|
569 |
'extraction_familles', |
|
570 |
'EXTRACTION-CAFPRO', |
|
571 |
'extraction_cafpro', |
|
572 |
] |
|
573 |
) |
|
560 |
assert set(resp.json['data'].keys()) == { |
|
561 |
'REPORT-REVENUS', |
|
562 |
'report_revenus', |
|
563 |
'EXTRACTION-FAMILLES', |
|
564 |
'extraction_familles', |
|
565 |
'EXTRACTION-CAFPRO', |
|
566 |
'extraction_cafpro', |
|
567 |
} |
|
574 | 568 | |
575 | 569 |
with mock.patch( |
576 | 570 |
'passerelle.contrib.toulouse_axel.models.ToulouseAxel.get_management_dates' |
577 | 571 |
) as management_dates: |
578 | 572 |
management_dates.return_value = {'foo': 'bar'} |
579 | 573 |
resp = app.get('/toulouse-axel/test/management_dates') |
580 |
assert set(resp.json.keys()) == set(['err', 'data'])
|
|
574 |
assert set(resp.json.keys()) == {'err', 'data'}
|
|
581 | 575 |
assert resp.json['err'] == 0 |
582 | 576 |
assert resp.json['data'] == {'foo': 'bar'} |
583 | 577 | |
... | ... | |
746 | 740 |
) |
747 | 741 |
with mock_getdata(content, 'RefVerifDui'): |
748 | 742 |
resp = app.post_json('/toulouse-axel/test/link?NameID=yyy', params=link_params) |
749 |
assert set(resp.json.keys()) == set(['err', 'link', 'created', 'dui', 'data'])
|
|
743 |
assert set(resp.json.keys()) == {'err', 'link', 'created', 'dui', 'data'}
|
|
750 | 744 |
assert resp.json['err'] == 0 |
751 | 745 |
assert resp.json['dui'] == 'XXX' |
752 | 746 |
assert resp.json['created'] is True |
... | ... | |
756 | 750 |
# again |
757 | 751 |
with mock_getdata(content, 'RefVerifDui'): |
758 | 752 |
resp = app.post_json('/toulouse-axel/test/link?NameID=yyy', params=link_params) |
759 |
assert set(resp.json.keys()) == set(['err', 'link', 'created', 'dui', 'data'])
|
|
753 |
assert set(resp.json.keys()) == {'err', 'link', 'created', 'dui', 'data'}
|
|
760 | 754 |
assert resp.json['err'] == 0 |
761 | 755 |
assert resp.json['dui'] == 'XXX' |
762 | 756 |
assert resp.json['created'] is False # link already exists |
... | ... | |
862 | 856 |
with mock_getdata(content, 'RefVerifDui'): |
863 | 857 |
resp = app.get('/toulouse-axel/test/active_dui?NameID=yyy') |
864 | 858 |
assert resp.json['err'] == 0 |
865 |
assert set(resp.json['data'].keys()) == set( |
|
866 |
[ |
|
867 |
'ADRESSE', |
|
868 |
'CODEMISEAJOUR', |
|
869 |
'DEMATFACTURES', |
|
870 |
'ENFANT', |
|
871 |
'IDDUI', |
|
872 |
'NBENFANTACTIF', |
|
873 |
'NBRLACTIF', |
|
874 |
'REACTUALISATIONENLIGNE', |
|
875 |
'REVENUS', |
|
876 |
'RL1', |
|
877 |
'RL2', |
|
878 |
'SITUATIONFAMILIALE', |
|
879 |
'TELFIXE', |
|
880 |
] |
|
881 |
) |
|
859 |
assert set(resp.json['data'].keys()) == { |
|
860 |
'ADRESSE', |
|
861 |
'CODEMISEAJOUR', |
|
862 |
'DEMATFACTURES', |
|
863 |
'ENFANT', |
|
864 |
'IDDUI', |
|
865 |
'NBENFANTACTIF', |
|
866 |
'NBRLACTIF', |
|
867 |
'REACTUALISATIONENLIGNE', |
|
868 |
'REVENUS', |
|
869 |
'RL1', |
|
870 |
'RL2', |
|
871 |
'SITUATIONFAMILIALE', |
|
872 |
'TELFIXE', |
|
873 |
} |
|
882 | 874 | |
883 | 875 | |
884 | 876 |
def test_referential_endpoint_no_result(app, resource): |
... | ... | |
951 | 943 |
with mock_getdata(content, 'RefFamilleDui'): |
952 | 944 |
resp = app.get('/toulouse-axel/test/family_info?NameID=yyy') |
953 | 945 |
assert resp.json['err'] == 0 |
954 |
assert set(resp.json['data'].keys()) == set( |
|
955 |
[ |
|
956 |
'ADRESSE', |
|
957 |
'CODEMISEAJOUR', |
|
958 |
'DEMATFACTURES', |
|
959 |
'ENFANT', |
|
960 |
'IDDUI', |
|
961 |
'NBENFANTACTIF', |
|
962 |
'NBRLACTIF', |
|
963 |
'REACTUALISATIONENLIGNE', |
|
964 |
'REVENUS', |
|
965 |
'RL1', |
|
966 |
'RL2', |
|
967 |
'SITUATIONFAMILIALE', |
|
968 |
'SITUATIONFAMILIALE_label', |
|
969 |
'TELFIXE', |
|
970 |
'management_dates', |
|
971 |
'annee_reference', |
|
972 |
'annee_reference_short', |
|
973 |
'annee_reference_label', |
|
974 |
] |
|
975 |
) |
|
946 |
assert set(resp.json['data'].keys()) == { |
|
947 |
'ADRESSE', |
|
948 |
'CODEMISEAJOUR', |
|
949 |
'DEMATFACTURES', |
|
950 |
'ENFANT', |
|
951 |
'IDDUI', |
|
952 |
'NBENFANTACTIF', |
|
953 |
'NBRLACTIF', |
|
954 |
'REACTUALISATIONENLIGNE', |
|
955 |
'REVENUS', |
|
956 |
'RL1', |
|
957 |
'RL2', |
|
958 |
'SITUATIONFAMILIALE', |
|
959 |
'SITUATIONFAMILIALE_label', |
|
960 |
'TELFIXE', |
|
961 |
'management_dates', |
|
962 |
'annee_reference', |
|
963 |
'annee_reference_short', |
|
964 |
'annee_reference_label', |
|
965 |
} |
|
976 | 966 |
assert resp.json['data']['ENFANT'][0]['id'] == '4242' |
977 | 967 |
assert resp.json['data']['ENFANT'][0]['text'] == 'foo foo' |
978 | 968 |
assert resp.json['data']['ENFANT'][0]['CONTACT'][0]['id'] == 0 |
... | ... | |
1040 | 1030 |
with mock_getdata(content, 'RefFamilleDui'): |
1041 | 1031 |
resp = app.get('/toulouse-axel/test/family_info?NameID=yyy') |
1042 | 1032 |
assert resp.json['err'] == 0 |
1043 |
assert set(resp.json['data'].keys()) == set( |
|
1044 |
[ |
|
1045 |
'ADRESSE', |
|
1046 |
'CODEMISEAJOUR', |
|
1047 |
'DEMATFACTURES', |
|
1048 |
'ENFANT', |
|
1049 |
'IDDUI', |
|
1050 |
'NBENFANTACTIF', |
|
1051 |
'NBRLACTIF', |
|
1052 |
'REACTUALISATIONENLIGNE', |
|
1053 |
'REVENUS', |
|
1054 |
'RL1', |
|
1055 |
'SITUATIONFAMILIALE', |
|
1056 |
'SITUATIONFAMILIALE_label', |
|
1057 |
'TELFIXE', |
|
1058 |
'management_dates', |
|
1059 |
'annee_reference', |
|
1060 |
'annee_reference_short', |
|
1061 |
'annee_reference_label', |
|
1062 |
] |
|
1063 |
) |
|
1033 |
assert set(resp.json['data'].keys()) == { |
|
1034 |
'ADRESSE', |
|
1035 |
'CODEMISEAJOUR', |
|
1036 |
'DEMATFACTURES', |
|
1037 |
'ENFANT', |
|
1038 |
'IDDUI', |
|
1039 |
'NBENFANTACTIF', |
|
1040 |
'NBRLACTIF', |
|
1041 |
'REACTUALISATIONENLIGNE', |
|
1042 |
'REVENUS', |
|
1043 |
'RL1', |
|
1044 |
'SITUATIONFAMILIALE', |
|
1045 |
'SITUATIONFAMILIALE_label', |
|
1046 |
'TELFIXE', |
|
1047 |
'management_dates', |
|
1048 |
'annee_reference', |
|
1049 |
'annee_reference_short', |
|
1050 |
'annee_reference_label', |
|
1051 |
} |
|
1064 | 1052 |
assert resp.json['data']['ADRESSE'] is None |
1065 | 1053 | |
1066 | 1054 | |
... | ... | |
1132 | 1120 |
with mock_getdata(content, 'RefFamilleDui'): |
1133 | 1121 |
resp = app.get('/toulouse-axel/test/child_info?NameID=yyy&idpersonne=4242') |
1134 | 1122 |
assert resp.json['err'] == 0 |
1135 |
assert set(resp.json['data'].keys()) == set( |
|
1136 |
[ |
|
1137 |
'id', |
|
1138 |
'text', |
|
1139 |
'ASSURANCE', |
|
1140 |
'CONTACT', |
|
1141 |
'DATENAISSANCE', |
|
1142 |
'IDPERSONNE', |
|
1143 |
'PRENOM', |
|
1144 |
'PRENOMMERE', |
|
1145 |
'PRENOMPERE', |
|
1146 |
'NOM', |
|
1147 |
'NOMMERE', |
|
1148 |
'NOMPERE', |
|
1149 |
'RATTACHEAUTREDUI', |
|
1150 |
'SANITAIRE', |
|
1151 |
'SEXE', |
|
1152 |
'clae_cantine_current', |
|
1153 |
] |
|
1154 |
) |
|
1123 |
assert set(resp.json['data'].keys()) == { |
|
1124 |
'id', |
|
1125 |
'text', |
|
1126 |
'ASSURANCE', |
|
1127 |
'CONTACT', |
|
1128 |
'DATENAISSANCE', |
|
1129 |
'IDPERSONNE', |
|
1130 |
'PRENOM', |
|
1131 |
'PRENOMMERE', |
|
1132 |
'PRENOMPERE', |
|
1133 |
'NOM', |
|
1134 |
'NOMMERE', |
|
1135 |
'NOMPERE', |
|
1136 |
'RATTACHEAUTREDUI', |
|
1137 |
'SANITAIRE', |
|
1138 |
'SEXE', |
|
1139 |
'clae_cantine_current', |
|
1140 |
} |
|
1155 | 1141 |
assert resp.json['data']['id'] == '4242' |
1156 | 1142 |
assert resp.json['data']['text'] == 'foo foo' |
1157 | 1143 |
assert resp.json['data']['CONTACT'][0]['id'] == 0 |
... | ... | |
1241 | 1227 |
resp = app.get('/toulouse-axel/test/children_contacts_info?NameID=yyy') |
1242 | 1228 |
assert resp.json['err'] == 0 |
1243 | 1229 |
assert len(resp.json['data']) == 3 |
1244 |
assert set([x['text'] for x in resp.json['data']]) == {'foo foo', 'foo2 foo2', 'foo3 foo3'}
|
|
1245 |
assert set([x['id'] for x in resp.json['data']]) == {0, 1, 2}
|
|
1230 |
assert {x['text'] for x in resp.json['data']} == {'foo foo', 'foo2 foo2', 'foo3 foo3'}
|
|
1231 |
assert {x['id'] for x in resp.json['data']} == {0, 1, 2}
|
|
1246 | 1232 | |
1247 | 1233 | |
1248 | 1234 |
def test_update_family_info_endpoint_axel_error(app, resource, update_params, family_data): |
... | ... | |
3389 | 3375 |
) |
3390 | 3376 |
assert resp.json['err'] == 0 |
3391 | 3377 |
assert len(resp.json['data']) == 5 |
3392 |
assert set(resp.json['data'][0].keys()) == set(['id', 'text', 'disabled', 'prefill', 'details'])
|
|
3378 |
assert set(resp.json['data'][0].keys()) == {'id', 'text', 'disabled', 'prefill', 'details'}
|
|
3393 | 3379 |
assert resp.json['data'][0]['id'] == '3535:MIDI:A19P1M2:2020-01-20' |
3394 | 3380 |
assert resp.json['data'][1]['id'] == '3535:MIDI:A19P1M2:2020-01-21' |
3395 | 3381 |
assert resp.json['data'][2]['id'] == '3535:MIDI:A19P1M2:2020-01-22' |
tests/test_toulouse_foederis.py | ||
---|---|---|
211 | 211 |
response = app.get(f'/toulouse-foederis/foederis/ds/{name}/') |
212 | 212 |
assert response.json['err'] == 0 |
213 | 213 |
assert response.json['last_update'] |
214 |
assert set(d['id'] for d in response.json['data']) == set(
|
|
214 |
assert {d['id'] for d in response.json['data']} == {
|
|
215 | 215 |
d['name'] for d in HTTP_MOCKS[name]['content']['results'] |
216 |
)
|
|
216 |
}
|
|
217 | 217 | |
218 | 218 |
def test_announce(self, app): |
219 | 219 |
response = app.get('/toulouse-foederis/foederis/announce/') |
tests/test_toulouse_maelis.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# Copyright (C) 2022 Entr'ouvert |
3 | 2 |
# |
4 | 3 |
# This program is free software: you can redistribute it and/or modify it |
... | ... | |
16 | 15 | |
17 | 16 |
import logging |
18 | 17 |
import os |
18 |
from unittest import mock |
|
19 | 19 | |
20 |
import mock |
|
21 | 20 |
import pytest |
22 | 21 |
from lxml import etree |
23 | 22 |
from requests.exceptions import ConnectionError |
tests/test_toulouse_smart.py | ||
---|---|---|
23 | 23 |
import uuid |
24 | 24 |
import zipfile |
25 | 25 |
from copy import deepcopy |
26 |
from unittest import mock |
|
26 | 27 | |
27 | 28 |
import httmock |
28 | 29 |
import lxml.etree as ET |
29 |
import mock |
|
30 | 30 |
import pytest |
31 | 31 |
from django.db import connection |
32 | 32 |
from django.db.migrations.executor import MigrationExecutor |
tests/test_utils_soap.py | ||
---|---|---|
14 | 14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 | 16 |
import logging |
17 |
from unittest import mock |
|
17 | 18 | |
18 |
import mock |
|
19 | 19 |
import pytest |
20 | 20 |
import requests |
21 | 21 |
from django.utils.encoding import force_bytes |
tests/test_utils_zip.py | ||
---|---|---|
1 |
# coding: utf-8 |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2019 Entr'ouvert |
4 | 3 |
# |
... | ... | |
15 | 14 |
# You should have received a copy of the GNU Affero General Public License |
16 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 16 | |
18 |
from __future__ import unicode_literals |
|
19 | 17 | |
20 | 18 |
import io |
21 | 19 |
import json |
tests/test_vivaticket.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
import mock |
|
1 |
from unittest import mock |
|
2 | ||
3 | 3 |
import pytest |
4 | 4 | |
5 | 5 |
import tests.utils |
tests/utils.py | ||
---|---|---|
1 | 1 |
import json |
2 |
from unittest import mock |
|
2 | 3 |
from urllib import parse as urlparse |
3 | 4 | |
4 | 5 |
import httmock |
5 |
import mock |
|
6 | 6 |
from django.contrib.contenttypes.models import ContentType |
7 | 7 |
from django.urls import reverse |
8 | 8 |
tests/wcs/conftest.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2019 Entr'ouvert |
4 | 3 |
# |
... | ... | |
56 | 55 |
cursor.execute('DROP DATABASE IF EXISTS %s' % database) |
57 | 56 | |
58 | 57 | |
59 |
class PostgresDB(object):
|
|
58 |
class PostgresDB: |
|
60 | 59 |
def __init__(self, database): |
61 | 60 |
self.database = database |
62 | 61 | |
63 | 62 |
@property |
64 | 63 |
def dsn(self): |
65 |
return 'dbname={self.database}'.format(self=self)
|
|
64 |
return f'dbname={self.database}'
|
|
66 | 65 | |
67 | 66 |
@contextlib.contextmanager |
68 | 67 |
def conn(self): |
... | ... | |
84 | 83 |
self.msg = msg |
85 | 84 |
self.exception = exception |
86 | 85 |
self.tb = tb |
87 |
super(WcsRunInContextError, self).__init__(msg)
|
|
86 |
super().__init__(msg) |
|
88 | 87 | |
89 | 88 |
def __str__(self): |
90 | 89 |
return '%s\n%s' % (self.msg, self.tb) |
91 | 90 | |
92 | 91 | |
93 |
class WcsHost(object):
|
|
92 |
class WcsHost: |
|
94 | 93 |
def __init__(self, wcs, hostname, database=None): |
95 | 94 |
self.wcs = wcs |
96 | 95 |
self.hostname = hostname |
... | ... | |
219 | 218 |
return wcs.WcsApi(self.url, orig='test', key='test') |
220 | 219 | |
221 | 220 | |
222 |
class Wcs(object):
|
|
221 |
class Wcs: |
|
223 | 222 |
def __init__(self, app_dir, port, wcs_host_class=None, **kwargs): |
224 | 223 |
self.app_dir = app_dir |
225 | 224 |
self.port = port |
tests/wcs/test_conftest.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 | 1 |
# passerelle - uniform access to multiple data sources and services |
3 | 2 |
# Copyright (C) 2019 Entr'ouvert |
4 | 3 |
# |
5 |
- |