c2cgeoportal-admin 2.6.0__py3-none-any.whl → 2.7.1.156__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. c2cgeoportal_admin/__init__.py +17 -10
  2. c2cgeoportal_admin/lib/lingua_extractor.py +77 -0
  3. c2cgeoportal_admin/lib/ogcserver_synchronizer.py +166 -54
  4. c2cgeoportal_admin/py.typed +0 -0
  5. c2cgeoportal_admin/routes.py +4 -3
  6. c2cgeoportal_admin/schemas/dimensions.py +12 -10
  7. c2cgeoportal_admin/schemas/functionalities.py +62 -21
  8. c2cgeoportal_admin/schemas/interfaces.py +22 -18
  9. c2cgeoportal_admin/schemas/metadata.py +99 -46
  10. c2cgeoportal_admin/schemas/restriction_areas.py +21 -19
  11. c2cgeoportal_admin/schemas/roles.py +7 -5
  12. c2cgeoportal_admin/schemas/treegroup.py +37 -16
  13. c2cgeoportal_admin/schemas/treeitem.py +2 -3
  14. c2cgeoportal_admin/static/layertree.css +3 -4
  15. c2cgeoportal_admin/static/navbar.css +36 -35
  16. c2cgeoportal_admin/static/theme.css +16 -9
  17. c2cgeoportal_admin/subscribers.py +3 -3
  18. c2cgeoportal_admin/templates/layertree.jinja2 +31 -9
  19. c2cgeoportal_admin/templates/navigation_navbar.jinja2 +33 -0
  20. c2cgeoportal_admin/templates/ogcserver_synchronize.jinja2 +12 -0
  21. c2cgeoportal_admin/templates/widgets/functionality_fields.pt +51 -0
  22. c2cgeoportal_admin/templates/widgets/metadata.pt +7 -1
  23. c2cgeoportal_admin/views/dimension_layers.py +7 -6
  24. c2cgeoportal_admin/views/functionalities.py +31 -5
  25. c2cgeoportal_admin/views/home.py +5 -5
  26. c2cgeoportal_admin/views/interfaces.py +5 -7
  27. c2cgeoportal_admin/views/layer_groups.py +9 -11
  28. c2cgeoportal_admin/views/layers.py +8 -7
  29. c2cgeoportal_admin/views/layers_vectortiles.py +30 -10
  30. c2cgeoportal_admin/views/layers_wms.py +39 -35
  31. c2cgeoportal_admin/views/layers_wmts.py +39 -35
  32. c2cgeoportal_admin/views/layertree.py +35 -27
  33. c2cgeoportal_admin/views/oauth2_clients.py +26 -21
  34. c2cgeoportal_admin/views/ogc_servers.py +57 -29
  35. c2cgeoportal_admin/views/restriction_areas.py +11 -10
  36. c2cgeoportal_admin/views/roles.py +14 -11
  37. c2cgeoportal_admin/views/themes.py +15 -14
  38. c2cgeoportal_admin/views/themes_ordering.py +13 -8
  39. c2cgeoportal_admin/views/treeitems.py +12 -11
  40. c2cgeoportal_admin/views/users.py +7 -5
  41. c2cgeoportal_admin/widgets.py +17 -14
  42. {c2cgeoportal_admin-2.6.0.dist-info → c2cgeoportal_admin-2.7.1.156.dist-info}/METADATA +15 -12
  43. c2cgeoportal_admin-2.7.1.156.dist-info/RECORD +92 -0
  44. {c2cgeoportal_admin-2.6.0.dist-info → c2cgeoportal_admin-2.7.1.156.dist-info}/WHEEL +1 -1
  45. c2cgeoportal_admin-2.7.1.156.dist-info/entry_points.txt +5 -0
  46. tests/__init__.py +9 -9
  47. tests/conftest.py +2 -1
  48. tests/test_edit_url.py +11 -13
  49. tests/test_functionalities.py +23 -10
  50. tests/test_interface.py +7 -7
  51. tests/test_layer_groups.py +13 -17
  52. tests/test_layers_vectortiles.py +11 -13
  53. tests/test_layers_wms.py +25 -36
  54. tests/test_layers_wmts.py +15 -19
  55. tests/test_layertree.py +99 -15
  56. tests/test_lingua_extractor_config.py +66 -0
  57. tests/test_main.py +3 -1
  58. tests/test_metadatas.py +34 -20
  59. tests/test_oauth2_clients.py +4 -4
  60. tests/test_ogc_servers.py +21 -10
  61. tests/test_restriction_areas.py +10 -12
  62. tests/test_role.py +37 -35
  63. tests/test_themes.py +40 -33
  64. tests/test_themes_ordering.py +1 -1
  65. tests/test_treegroup.py +2 -2
  66. tests/test_user.py +15 -13
  67. tests/themes_ordering.py +1 -1
  68. c2cgeoportal_admin/templates/navigation_vertical.jinja2 +0 -33
  69. c2cgeoportal_admin-2.6.0.dist-info/RECORD +0 -89
  70. c2cgeoportal_admin-2.6.0.dist-info/entry_points.txt +0 -3
  71. {c2cgeoportal_admin-2.6.0.dist-info → c2cgeoportal_admin-2.7.1.156.dist-info}/top_level.txt +0 -0
@@ -1,21 +1,22 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: c2cgeoportal-admin
3
- Version: 2.6.0
3
+ Version: 2.7.1.156
4
4
  Summary: c2cgeoportal admin
5
5
  Home-page: https://github.com/camptocamp/c2cgeoportal/
6
6
  Author: Camptocamp
7
7
  Author-email: info@camptocamp.com
8
- License: UNKNOWN
9
8
  Keywords: web gis geoportail c2cgeoportal geocommune pyramid
10
- Platform: UNKNOWN
11
- Classifier: Programming Language :: Python
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.7
9
+ Classifier: Development Status :: 6 - Mature
10
+ Classifier: Environment :: Web Environment
14
11
  Classifier: Framework :: Pyramid
15
- Classifier: Topic :: Internet :: WWW/HTTP
16
- Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
12
+ Classifier: Intended Audience :: Other Audience
17
13
  Classifier: License :: OSI Approved :: BSD License
18
- Classifier: Development Status :: 6 - Mature
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Topic :: Scientific/Engineering :: GIS
19
+ Classifier: Typing :: Typed
19
20
  Description-Content-Type: text/markdown
20
21
  Requires-Dist: c2cgeoform
21
22
  Requires-Dist: c2cwsgiutils
@@ -28,8 +29,12 @@ Requires-Dist: pyramid-debugtoolbar
28
29
  Requires-Dist: pyramid-jinja2
29
30
  Requires-Dist: pyramid-tm
30
31
  Requires-Dist: sqlalchemy
31
- Requires-Dist: translationstring
32
32
  Requires-Dist: zope.event
33
+ Requires-Dist: translationstring
34
+ Requires-Dist: jinja2 (>=2.11.3)
35
+ Requires-Dist: pygments (>=2.7.4)
36
+ Requires-Dist: setuptools (>=65.5.1)
37
+ Requires-Dist: requests (>=2.31.0)
33
38
 
34
39
  # c2cgeoportal admin interface
35
40
 
@@ -43,5 +48,3 @@ make serve
43
48
  ```
44
49
 
45
50
  Now open http://localhost:8888/ in your favorite browser.
46
-
47
-
@@ -0,0 +1,92 @@
1
+ c2cgeoportal_admin/__init__.py,sha256=4UYLGCcfxd8mfHojIalTFmaYNgD67WFbgVhw2sl5yok,4959
2
+ c2cgeoportal_admin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ c2cgeoportal_admin/routes.py,sha256=So17Lj2v8UigkxVwfYJrK_piDejRkvekPiFibyr3qiw,4676
4
+ c2cgeoportal_admin/subscribers.py,sha256=P1CaccDTpuxrWak_gMN2qBurz3OrAZ6aZ1LA7P3avu8,2430
5
+ c2cgeoportal_admin/widgets.py,sha256=tW6brDW-95LuRnSsRd_8xVRKNAkwkYtdi8zQ44TBj18,6132
6
+ c2cgeoportal_admin/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ c2cgeoportal_admin/lib/lingua_extractor.py,sha256=Dw4vo46TcUnJ7vvxgFezPYidfEdL2pHJUM0qxAaJ1KE,3380
8
+ c2cgeoportal_admin/lib/ogcserver_synchronizer.py,sha256=NuCV8EpUso01to2PYbh6NpXPcD702pQOSslah__Bzus,15421
9
+ c2cgeoportal_admin/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ c2cgeoportal_admin/schemas/dimensions.py,sha256=rPMEuIdGiVGS5e0xqXUu-COVKlrWg9rpp-xe-8aHbOQ,2290
11
+ c2cgeoportal_admin/schemas/functionalities.py,sha256=AptqKn2oyy74qivzihNfeNvmaDILsl36bSoJdSNXh9Y,3941
12
+ c2cgeoportal_admin/schemas/interfaces.py,sha256=0NCRDZOqbw7Bwj-l3GNsVwYDHck4F0q1fCSo1kTYoOY,2578
13
+ c2cgeoportal_admin/schemas/metadata.py,sha256=px0Teh0vtyimQfzL7zXHXIEkWtBbD00OsadfDDeqSkY,8991
14
+ c2cgeoportal_admin/schemas/restriction_areas.py,sha256=48hFUgFznl_1bYsl490YSXLbXfjCY_f6gURQtB_7eIk,2598
15
+ c2cgeoportal_admin/schemas/roles.py,sha256=4JJrgZNKsj_wru_YGOWxZTEXGVm0hahbAkYf2aePGzI,2507
16
+ c2cgeoportal_admin/schemas/treegroup.py,sha256=-s_aKAzwYwS9zVsuqQAp_7M_-c00LVq-R6dC8BiUWk0,7039
17
+ c2cgeoportal_admin/schemas/treeitem.py,sha256=qnjrLd2LD7NCBjXqzw7aRn83cw_hYZbepJdLzOz0rBk,2117
18
+ c2cgeoportal_admin/static/layertree.css,sha256=tk54KGW0yRRmdrY35gOCZG3qTsqWtGNEwvBYPQKhaVs,3177
19
+ c2cgeoportal_admin/static/navbar.css,sha256=QIaAQsb4n17OfwdKEQdmNDVPCP23Yu-oGW4xsSaHyW0,2307
20
+ c2cgeoportal_admin/static/theme.css,sha256=eHtBEJcBtDhyZJvCKNxE5hgril0VpLtcDKfNFdgCSVw,2025
21
+ c2cgeoportal_admin/templates/404.jinja2,sha256=F05OZUzJljcieoCFMP7Oz1F6Jb-VZ06hTOSc9mrb87g,1420
22
+ c2cgeoportal_admin/templates/edit.jinja2,sha256=rkBQiz0JZdL7VDq8XrhRLTv6JaiFt_QB8CwP3NMHWQY,1302
23
+ c2cgeoportal_admin/templates/home.jinja2,sha256=WDQwmBGMZxsiOLw9YeYPLuca_mjjntjrTh529euzd1o,1516
24
+ c2cgeoportal_admin/templates/index.jinja2,sha256=HPgilbqh5dv-yc_T_bc1hV2DEtV2wD617_aAERC2VSk,2005
25
+ c2cgeoportal_admin/templates/layertree.jinja2,sha256=1ys5XDY3nb4gAu8JazkwSFeJUdGRadT7WaBuvin_hYg,9830
26
+ c2cgeoportal_admin/templates/layout.jinja2,sha256=KCDwATUYBu-ZXv7ijo0S0PlTmKtU-JxW8gMhvPA_kAE,4105
27
+ c2cgeoportal_admin/templates/navigation_navbar.jinja2,sha256=XzVQDpo3ClIiRxWf5eDULHZi9u-veYOmndiE_Twqxog,4166
28
+ c2cgeoportal_admin/templates/ogcserver_synchronize.jinja2,sha256=rdQfbHBzrV5VUq5TC97QR7pv8bRvrdKaUUZpnQyldoE,4327
29
+ c2cgeoportal_admin/templates/widgets/child.pt,sha256=JjxI0oVADhS3SoFgg0iN8P4ca1I_UGr7fWRp3wpZXsE,2159
30
+ c2cgeoportal_admin/templates/widgets/children.pt,sha256=0TPpatvmZcU2TxbcZMjDz8VQcLGtoHkuDJ-eAGvjXho,6625
31
+ c2cgeoportal_admin/templates/widgets/dimension.pt,sha256=1BXmE7s9JpzaJSHAQEtZk0DHB11pQ4FNQPaG_4c8CYo,2627
32
+ c2cgeoportal_admin/templates/widgets/dimensions.pt,sha256=LjWjsgdcFYZxpB_30-3NOfvq5KYkKTu49F-P-r9d5Jg,1211
33
+ c2cgeoportal_admin/templates/widgets/functionality_fields.pt,sha256=8TvwXCmQOtYFkiqsa4AHFUYsWk92LLnthz8bDrLmMBc,1969
34
+ c2cgeoportal_admin/templates/widgets/layer_fields.pt,sha256=RJBYt8ji6YQp9ZaNZJD-caLgy856a6rzlKSMnuZWphw,3223
35
+ c2cgeoportal_admin/templates/widgets/layer_group_fields.pt,sha256=xnqIqFjPPan81OqLwKeDnvNtlhEvYss6h2J9txH5neE,2459
36
+ c2cgeoportal_admin/templates/widgets/layer_v1_fields.pt,sha256=w-MujUevHWmnOkOTbbvES6alDoL_UO1eiMj8SCxcQEY,3956
37
+ c2cgeoportal_admin/templates/widgets/metadata.pt,sha256=jWiLmS0J-cwFkqUxxZwKnkPNX9ShTG2zj0tUCq4TMjQ,3735
38
+ c2cgeoportal_admin/templates/widgets/metadatas.pt,sha256=ErgAH0DA94MO7gqEJ2iZdQ9LRptP2YKH78yze-jdl2Q,1476
39
+ c2cgeoportal_admin/templates/widgets/ogcserver_fields.pt,sha256=x0bDmgrnj9SA6RCVpg3k2lTkkXPkuBFPKMScDgDeyGU,1724
40
+ c2cgeoportal_admin/templates/widgets/restriction_area_fields.pt,sha256=pZVE0KcitAF7HXc3ZlniLr0QwSD05TOhlgieLUR1i7Q,1731
41
+ c2cgeoportal_admin/templates/widgets/role_fields.pt,sha256=gVd9eRYaqw8fGmZauqEUS_Igmyxaa71qcmdC1KUx5nY,2623
42
+ c2cgeoportal_admin/templates/widgets/theme_fields.pt,sha256=68G1Ya8-Dc6pCeP-taQ0ofCIpnY_v0rouazkFhfQflU,3083
43
+ c2cgeoportal_admin/templates/widgets/user_fields.pt,sha256=twmajhUYL1xa47Eu-iATKifNPA5lu3SGpqdKajH6gL8,1753
44
+ c2cgeoportal_admin/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
+ c2cgeoportal_admin/views/dimension_layers.py,sha256=jupwqX_kO37ukcWE-SsO290JdKENEmfoYxk4sRWb25Y,2598
46
+ c2cgeoportal_admin/views/functionalities.py,sha256=U51DvRd6Jg40VQm66kyVy363cDGGEol0WwaQC8b2ZKM,4002
47
+ c2cgeoportal_admin/views/home.py,sha256=h_hJWIKpzJeSmXl58J0nvZdEg7avSYOOVUEEnlV-r0k,1943
48
+ c2cgeoportal_admin/views/interfaces.py,sha256=3Sl-57PchMlUw_RrvL7F4KTpa57ifpNjOxk-nWqMXpk,3465
49
+ c2cgeoportal_admin/views/layer_groups.py,sha256=CbuURDXMcRXnWbW9aEhXP9nSiSiFq4m3JdtgQS6agxs,3956
50
+ c2cgeoportal_admin/views/layers.py,sha256=xjvcRvKVpeD-LRuVwE8PGkDT-Kih9ADX0beEDcOP1bE,3039
51
+ c2cgeoportal_admin/views/layers_vectortiles.py,sha256=lREdMc7bo2TVqdf-s6MzNXZoauReqFS_K-Hng49NUT4,4932
52
+ c2cgeoportal_admin/views/layers_wms.py,sha256=p3g2zc2waMBBrlFQjgTUn9YTg3WcXQofx5Yw1b3ozAg,7954
53
+ c2cgeoportal_admin/views/layers_wmts.py,sha256=IxvF_knk3HYsa8gKhIaZsyi5Uhmv_Qrmd50gU8BPla8,7731
54
+ c2cgeoportal_admin/views/layertree.py,sha256=x1nTVwyf-ZK7M0gIDpsDdySMZm3XmE6yGEE9j8VYQ4Y,8589
55
+ c2cgeoportal_admin/views/oauth2_clients.py,sha256=hovhxGKK3et_Lny7UuXsterP_OUSZ1HW7YqhawEXrOw,3740
56
+ c2cgeoportal_admin/views/ogc_servers.py,sha256=rK0dIS2XLTc5EDeGrnDf_mpHlNXJsCEyUpci_lIexR8,7476
57
+ c2cgeoportal_admin/views/restriction_areas.py,sha256=0Zpo8p5Zsw3JdPCH8kqWr020boBpNiKMhARKcgCsOVU,5549
58
+ c2cgeoportal_admin/views/roles.py,sha256=7BjQ0zLcsf6JW8OgBKJukaMRksUB-VKTeILfhP9bLG0,5858
59
+ c2cgeoportal_admin/views/themes.py,sha256=Qv6sZ7op90JEd7ASGuTU68rjTdsRrGlf0clYqqumuFI,5710
60
+ c2cgeoportal_admin/views/themes_ordering.py,sha256=NYN3I2tDwLW5E4G-695DwV0dCbHUAObWVFYZ8Bir1-o,5590
61
+ c2cgeoportal_admin/views/treeitems.py,sha256=p-Ba_v3UFtUZEmlct4MZmkwv7jzMoxNKnCVa_FX2hxg,3860
62
+ c2cgeoportal_admin/views/users.py,sha256=YzyKYDDTVn69NQPkrlkmbpgrtsIkK_cxqlcWa6utAVA,5355
63
+ tests/__init__.py,sha256=JbVMbOZgS0u5_MhWBnyzT1gdv3cXwhkXyLQgDqpZAik,9525
64
+ tests/conftest.py,sha256=ah7JmR2epDZul2rmMH5wuUzkSpXIjm8dd-cgGjK6_k0,2119
65
+ tests/test_edit_url.py,sha256=00Q9E3QOtsEEB0YJQehllFr1ztQCU3wc9OyayXCHYI4,4495
66
+ tests/test_functionalities.py,sha256=CPHxBueoCt8W76VJN2sCouxQyc7LD7ccusRah5UK2ys,4126
67
+ tests/test_home.py,sha256=oA4i-V9jJQQgHD9Gz79mgIEMUCRw3tmIQVqdhM9Q2Fo,426
68
+ tests/test_interface.py,sha256=ml1yM4t1o6jIQEHZRwMywjt7mjkUhP-34VKBgHOmWes,4704
69
+ tests/test_layer_groups.py,sha256=Bb1Rsy8QkzGee6edY4UQY8hcxvp54PE7gXUcHoi__JA,11062
70
+ tests/test_layers_vectortiles.py,sha256=DjOLkm3o8nPJJbd010Xi_pwHTK5roiHoQBYAuNaZW5c,9395
71
+ tests/test_layers_wms.py,sha256=MISvkAjEZ4oSD1xg7Zah_GKiBHNu60D8kT03f241wuc,18175
72
+ tests/test_layers_wmts.py,sha256=jjO3AbOQgHgC2yXdYke339W11Ygz1b8DpuAn4OXLnxE,11185
73
+ tests/test_layertree.py,sha256=uu-2AzVtqr87eqq9w_5EWPR_KIXFFjEipEA0_ImnkCU,11336
74
+ tests/test_learn.py,sha256=gQwe-Bim0eihZH0rbBWDn6_rIBxvQD_lyu9MlOljupM,2307
75
+ tests/test_left_menu.py,sha256=-K_429ZcW5Hsz317StIRVz8VtU7GDMH7UCTzZDfckUo,920
76
+ tests/test_lingua_extractor_config.py,sha256=3dqgIdCB1M3YPzXrgDCFQ74t0t4QRXwdQZSy6AMqKp8,2515
77
+ tests/test_main.py,sha256=_gUdMrMMAEzvGIf1QwkoHQkd0eBACz05ycTidCHP5Ao,365
78
+ tests/test_metadatas.py,sha256=dawAKLxyWy4Ok3TWAR5zsB_IN_Ci_VJdjNE9fU5NVjE,12089
79
+ tests/test_oauth2_clients.py,sha256=UaTz7jE0-V2JJ4VkjA3W0FlzgkfacI1jchiynXNNYbc,5782
80
+ tests/test_ogc_servers.py,sha256=qPrbLFw8zaPOpk-fbydJUtfgLl9nxA81jOUNd1l8EUI,6436
81
+ tests/test_restriction_areas.py,sha256=S97lbxHghyhz9h8Sv78jYt2EOQEgwlUp8zCfOtmV-OU,7925
82
+ tests/test_role.py,sha256=99Rk4PCTtoVzbiTP3cR3cVkuIArdLywBl2Hx8Pk5lnE,11820
83
+ tests/test_themes.py,sha256=e-OGon6beHfY4q8xOGsYjW-_pm0-wTA18DPBOz6F9iM,15181
84
+ tests/test_themes_ordering.py,sha256=qIEgLgIjSYpWqMVXBAhOk6BKBUAPXkiXsxWB_A1Dy4s,2244
85
+ tests/test_treegroup.py,sha256=Plv119G4TWlurWLE7Z1mWGeHHPScK_fWKcDmDzMUlIU,576
86
+ tests/test_user.py,sha256=pW2Fsbw8wIP2H3BxAMUojSonhMMyr63jsWFmEteaogk,11659
87
+ tests/themes_ordering.py,sha256=mbjTJHl63UVdv5SsfgDrjOx-1z6C5L4wDSCzIh7LPAE,1343
88
+ c2cgeoportal_admin-2.7.1.156.dist-info/METADATA,sha256=cRegyrlS02-K1HNMG99ohp7l0WSyWQpqnPMJC7zInU4,1492
89
+ c2cgeoportal_admin-2.7.1.156.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
90
+ c2cgeoportal_admin-2.7.1.156.dist-info/entry_points.txt,sha256=ZF-xnP-Q_zr7y6yRmVqjIGVZ1L2iKi5uaOxjxJQBuG4,164
91
+ c2cgeoportal_admin-2.7.1.156.dist-info/top_level.txt,sha256=DgcTJgTvpJUB8HqwYB14PdLBPAOAFk0B8oqnSTFoAU4,25
92
+ c2cgeoportal_admin-2.7.1.156.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.34.2)
2
+ Generator: bdist_wheel (0.40.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,5 @@
1
+ [lingua.extractors]
2
+ geomapfish-admin-config = c2cgeoportal_admin.lib.lingua_extractor:GeomapfishConfigExtractor
3
+
4
+ [paste.app_factory]
5
+ main = c2cgeoportal_admin:main
tests/__init__.py CHANGED
@@ -38,7 +38,7 @@ def factory_build_layers(layer_builder, dbsession, add_dimension=True):
38
38
  RestrictionArea,
39
39
  )
40
40
 
41
- restrictionareas = [RestrictionArea(name="restrictionarea_{}".format(i)) for i in range(0, 5)]
41
+ restrictionareas = [RestrictionArea(name=f"restrictionarea_{i}") for i in range(0, 5)]
42
42
 
43
43
  interfaces = [Interface(name) for name in ["desktop", "mobile", "edit", "routing"]]
44
44
 
@@ -50,7 +50,7 @@ def factory_build_layers(layer_builder, dbsession, add_dimension=True):
50
50
  ("snappingConfig", '{"tolerance": 50}'),
51
51
  ]
52
52
 
53
- groups = [LayerGroup(name="layer_group_{}".format(i)) for i in range(0, 5)]
53
+ groups = [LayerGroup(name=f"layer_group_{i}") for i in range(0, 5)]
54
54
 
55
55
  layers = []
56
56
  for i in range(0, 25):
@@ -95,18 +95,18 @@ class AbstractViewsTests:
95
95
 
96
96
  def get(self, test_app, path="", locale="en", status=200, **kwargs):
97
97
  return test_app.get(
98
- "{}{}".format(self._prefix, path),
99
- headers={"Cookie": "_LOCALE_={}".format(locale)},
98
+ f"{self._prefix}{path}",
99
+ headers={"Cookie": f"_LOCALE_={locale}"},
100
100
  status=status,
101
101
  **kwargs,
102
102
  )
103
103
 
104
104
  def get_item(self, test_app, item_id, **kwargs):
105
- return self.get(test_app, "/{}".format(item_id), **kwargs)
105
+ return self.get(test_app, f"/{item_id}", **kwargs)
106
106
 
107
107
  def check_left_menu(self, resp, title):
108
108
  link = resp.html.select_one(".navbar li.active a")
109
- assert "http://localhost{}".format(self._prefix) == link.attrs["href"]
109
+ assert f"http://localhost{self._prefix}" == link.attrs["href"]
110
110
  assert title == link.getText()
111
111
 
112
112
  def check_grid_headers(self, resp, expected_col_headers, new="New"):
@@ -124,7 +124,7 @@ class AbstractViewsTests:
124
124
 
125
125
  def check_search(self, test_app, search="", offset=0, limit=10, sort="", order="", total=None):
126
126
  json = test_app.post(
127
- "{}/grid.json".format(self._prefix),
127
+ f"{self._prefix}/grid.json",
128
128
  params={"offset": offset, "limit": limit, "search": search, "sort": sort, "order": order},
129
129
  status=200,
130
130
  ).json
@@ -135,8 +135,8 @@ class AbstractViewsTests:
135
135
  def check_checkboxes(self, form, name, expected):
136
136
  for i, exp in enumerate(expected):
137
137
  field = form.get(name, index=i)
138
- checkbox = form.html.select_one("#{}".format(field.id))
139
- label = form.html.select_one("label[for={}]".format(field.id))
138
+ checkbox = form.html.select_one(f"#{field.id}")
139
+ label = form.html.select_one(f"label[for={field.id}]")
140
140
  assert exp["label"] == list(label.stripped_strings)[0]
141
141
  assert exp["value"] == checkbox["value"]
142
142
  assert exp["checked"] == field.checked
tests/conftest.py CHANGED
@@ -56,6 +56,7 @@ def app(app_env, dbsession):
56
56
  config.add_request_method(lambda request: dbsession, "dbsession", reify=True)
57
57
  config.add_route("user_add", "user_add")
58
58
  config.add_route("users_nb", "users_nb")
59
+ config.add_route("base", "/", static=True)
59
60
  config.scan(package="tests")
60
61
  app = config.make_wsgi_app()
61
62
  yield app
@@ -67,7 +68,7 @@ def settings(app_env):
67
68
  yield app_env.get("registry").settings
68
69
 
69
70
 
70
- @pytest.fixture(scope="session") # noqa: F811
71
+ @pytest.fixture(scope="session") # noqa: ignore=F811
71
72
  @pytest.mark.usefixtures("app")
72
73
  def test_app(request, app):
73
74
  testapp = WebTestApp(app)
tests/test_edit_url.py CHANGED
@@ -24,12 +24,12 @@ def edit_url_test_data(dbsession, transact):
24
24
  Theme,
25
25
  )
26
26
 
27
- restrictionareas = [RestrictionArea(name="restrictionarea_{}".format(i)) for i in range(0, 5)]
27
+ restrictionareas = [RestrictionArea(name=f"restrictionarea_{i}") for i in range(0, 5)]
28
28
  functionalities = {}
29
- for name in ("default_basemap", "location"):
29
+ for name in ("default_basemap", "default_theme"):
30
30
  functionalities[name] = []
31
31
  for v in range(0, 4):
32
- functionality = Functionality(name=name, value="value_{}".format(v))
32
+ functionality = Functionality(name=name, value=f"value_{v}")
33
33
  dbsession.add(functionality)
34
34
  functionalities[name].append(functionality)
35
35
 
@@ -38,10 +38,10 @@ def edit_url_test_data(dbsession, transact):
38
38
 
39
39
  layers_wmts = []
40
40
  for i in range(0, 5):
41
- name = "layer_wmts_{}".format(i)
41
+ name = f"layer_wmts_{i}"
42
42
  layer_wmts = LayerWMTS(name=name)
43
43
  layer_wmts.layer = name
44
- layer_wmts.url = "https://server{}.net/wmts".format(i)
44
+ layer_wmts.url = f"https://server{i}.net/wmts"
45
45
  layer_wmts.restrictionareas = [restrictionareas[i % 5], restrictionareas[(i + 2) % 5]]
46
46
  if i % 10 != 1:
47
47
  layer_wmts.interfaces = [interfaces[i % 4], interfaces[(i + 2) % 4]]
@@ -52,8 +52,8 @@ def edit_url_test_data(dbsession, transact):
52
52
 
53
53
  layers_wms = []
54
54
  for i in range(0, 5):
55
- layer_wms = LayerWMS(name="layer_wms_{}".format(i))
56
- layer_wms.layer = "wms_layer_{}".format(i)
55
+ layer_wms = LayerWMS(name=f"layer_wms_{i}")
56
+ layer_wms.layer = f"wms_layer_{i}"
57
57
  layer_wms.ogc_server = ogc_server
58
58
  layers_wms.append(layer_wms)
59
59
  dbsession.add(layer_wms)
@@ -63,9 +63,7 @@ def edit_url_test_data(dbsession, transact):
63
63
  for i in range(0, 5):
64
64
  role = Role("secretary_" + str(i))
65
65
  role.functionalities = [
66
- functionalities["default_basemap"][0],
67
- functionalities["location"][0],
68
- functionalities["location"][1],
66
+ functionalities["default_theme"][0],
69
67
  ]
70
68
  role.restrictionareas = [restrictionareas[0], restrictionareas[1]]
71
69
  dbsession.add(role)
@@ -98,12 +96,12 @@ class TestUrlEdit(AbstractViewsTests):
98
96
  _prefix = "/admin/"
99
97
 
100
98
  def _get(self, test_app, tablename, pk):
101
- path = "/{}/{}".format(tablename, pk)
99
+ path = f"/{tablename}/{pk}"
102
100
  return test_app.get(path, status=200)
103
101
 
104
102
  def _check_link(self, test_app, resp, item, table, status):
105
- link = resp.html.select_one(".form-group.item-{} a".format(item))
106
- assert re.match(r"http://localhost/admin/{}/\d+".format(table), link["href"]) is not None
103
+ link = resp.html.select_one(f".form-group.item-{item} a")
104
+ assert re.match(rf"http://localhost/admin/{table}/\d+", link["href"]) is not None
107
105
  test_app.get(link.get("href"), status=status)
108
106
 
109
107
  def test_layer_wms_edit(self, edit_url_test_data, test_app):
@@ -9,15 +9,18 @@ from . import AbstractViewsTests
9
9
 
10
10
  @pytest.fixture(scope="function")
11
11
  @pytest.mark.usefixtures("dbsession", "transact")
12
- def functionality_test_data(dbsession, transact):
12
+ def functionality_test_data(dbsession, transact, settings):
13
13
  del transact
14
14
 
15
15
  from c2cgeoportal_commons.models.main import Functionality
16
16
 
17
17
  functionalities = []
18
18
  for i in range(0, 4):
19
- functionality = Functionality(name="functionality_{}".format(i), value="value_{}".format(i))
20
- functionality.description = "description_{}".format(i)
19
+ functionality = Functionality(
20
+ settings["admin_interface"]["available_functionalities"][i]["name"],
21
+ value=f"value_{i}",
22
+ )
23
+ functionality.description = f"description_{i}"
21
24
  dbsession.add(functionality)
22
25
  functionalities.append(functionality)
23
26
 
@@ -47,7 +50,7 @@ class TestFunctionality(AbstractViewsTests):
47
50
 
48
51
  def test_grid_search(self, test_app):
49
52
  # search on functionality name
50
- self.check_search(test_app, "functionality_0", total=1)
53
+ self.check_search(test_app, "default_basemap", total=1)
51
54
 
52
55
  def test_submit_new(self, dbsession, test_app):
53
56
  from c2cgeoportal_commons.models.main import Functionality
@@ -65,7 +68,7 @@ class TestFunctionality(AbstractViewsTests):
65
68
 
66
69
  def test_edit(self, test_app, functionality_test_data):
67
70
  functionality = functionality_test_data["functionalities"][0]
68
- resp = test_app.get("/admin/functionalities/{}".format(functionality.id), status=200)
71
+ resp = test_app.get(f"/admin/functionalities/{functionality.id}", status=200)
69
72
  form = resp.form
70
73
  assert str(functionality.id) == self.get_first_field_named(form, "id").value
71
74
  assert "hidden" == self.get_first_field_named(form, "id").attrs["type"]
@@ -79,20 +82,30 @@ class TestFunctionality(AbstractViewsTests):
79
82
 
80
83
  functionality = functionality_test_data["functionalities"][0]
81
84
  deleted_id = functionality.id
82
- test_app.delete("/admin/functionalities/{}".format(deleted_id), status=200)
85
+ test_app.delete(f"/admin/functionalities/{deleted_id}", status=200)
83
86
  assert dbsession.query(Functionality).get(deleted_id) is None
84
87
 
85
88
  def test_duplicate(self, functionality_test_data, test_app, dbsession):
86
89
  from c2cgeoportal_commons.models.main import Functionality
87
90
 
88
91
  functionality = functionality_test_data["functionalities"][3]
89
- resp = test_app.get("/admin/functionalities/{}/duplicate".format(functionality.id), status=200)
92
+
93
+ resp = test_app.get(f"/admin/functionalities/{functionality.id}/duplicate", status=200)
94
+
90
95
  form = resp.form
91
- assert "" == self.get_first_field_named(form, "id").value
92
- self.set_first_field_named(form, "name", "clone")
96
+ assert form["name"].value == functionality.name
97
+ assert form["description"].value == functionality.description
98
+ assert form["value"].value == functionality.value
99
+ form["value"].value = "another_value"
93
100
  resp = form.submit("submit")
101
+
94
102
  assert resp.status_int == 302
95
- functionality = dbsession.query(Functionality).filter(Functionality.name == "clone").one()
103
+ functionality = (
104
+ dbsession.query(Functionality)
105
+ .filter(Functionality.name == functionality.name)
106
+ .filter(Functionality.value == "another_value")
107
+ .one()
108
+ )
96
109
  assert str(functionality.id) == re.match(
97
110
  r"http://localhost/admin/functionalities/(.*)\?msg_col=submit_ok", resp.location
98
111
  ).group(1)
tests/test_interface.py CHANGED
@@ -16,14 +16,14 @@ def interface_test_data(dbsession, transact):
16
16
 
17
17
  themes = []
18
18
  for i in range(0, 5):
19
- theme = Theme(name="theme_{}".format(i), ordering=1)
19
+ theme = Theme(name=f"theme_{i}", ordering=1)
20
20
  themes.append(theme)
21
21
 
22
- servers = [OGCServer(name="server_{}".format(i)) for i in range(0, 4)]
22
+ servers = [OGCServer(name=f"server_{i}") for i in range(0, 4)]
23
23
 
24
24
  layers = []
25
25
  for i in range(0, 15):
26
- layer = LayerWMS(name="layer_wms_{}".format(i))
26
+ layer = LayerWMS(name=f"layer_wms_{i}")
27
27
  layer.public = 1 == i % 2
28
28
  layer.ogc_server = servers[i % 4]
29
29
  dbsession.add(layer)
@@ -31,7 +31,7 @@ def interface_test_data(dbsession, transact):
31
31
 
32
32
  interfaces = []
33
33
  for i in range(0, 5):
34
- interface = Interface(name="interface_{}".format(i), description="description_{}".format(i))
34
+ interface = Interface(name=f"interface_{i}", description=f"description_{i}")
35
35
  interface.themes = [themes[i % 2], themes[(i + 5) % 5]]
36
36
  interface.layers = [layers[i % 2], layers[(i + 4) % 5]]
37
37
 
@@ -101,7 +101,7 @@ class TestInterface(AbstractViewsTests):
101
101
  descriptions = "{}, {}".format(
102
102
  interface_test_data["interfaces"][0].description, interface_test_data["interfaces"][1].description
103
103
  )
104
- resp = test_app.get("/admin/interfaces/{}".format(interface.id), status=200)
104
+ resp = test_app.get(f"/admin/interfaces/{interface.id}", status=200)
105
105
  form = resp.form
106
106
  form["description"] = descriptions
107
107
  assert str(interface.id) == self.get_first_field_named(form, "id").value
@@ -114,12 +114,12 @@ class TestInterface(AbstractViewsTests):
114
114
  from c2cgeoportal_commons.models.main import Interface
115
115
 
116
116
  interface = interface_test_data["interfaces"][0]
117
- test_app.delete("/admin/interfaces/{}".format(interface.id), status=200)
117
+ test_app.delete(f"/admin/interfaces/{interface.id}", status=200)
118
118
  assert len(dbsession.query(Interface).filter(Interface.id == interface.id).all()) == 0
119
119
 
120
120
  def test_duplicate(self, interface_test_data, test_app):
121
121
  interface = interface_test_data["interfaces"][3]
122
- resp = test_app.get("/admin/interfaces/{}/duplicate".format(interface.id), status=200)
122
+ resp = test_app.get(f"/admin/interfaces/{interface.id}/duplicate", status=200)
123
123
  form = resp.form
124
124
  assert "" == self.get_first_field_named(form, "id").value
125
125
  assert str(interface.description or "") == "description_3"
@@ -22,7 +22,7 @@ def layer_groups_test_data(dbsession, transact):
22
22
 
23
23
  groups = []
24
24
  for i in range(0, 12):
25
- group = LayerGroup(name="groups_{num:02d}".format(num=i), is_expanded=False)
25
+ group = LayerGroup(name=f"groups_{i:02d}")
26
26
  group.metadatas = [
27
27
  Metadata(name=metadatas_protos[id][0], value=metadatas_protos[id][1])
28
28
  for id in [i % 3, (i + 2) % 3]
@@ -73,7 +73,6 @@ class TestLayersGroups(TestTreeGroup):
73
73
  ("id", "id", "true"),
74
74
  ("name", "Name"),
75
75
  ("description", "Description"),
76
- ("is_expanded", "Expanded"),
77
76
  ("parents_relation", "Parents", "false"),
78
77
  ("metadatas", "Metadatas", "false"),
79
78
  ]
@@ -103,8 +102,6 @@ class TestLayersGroups(TestTreeGroup):
103
102
  assert "hidden" == self.get_first_field_named(form, "id").attrs["type"]
104
103
  assert group.name == self.get_first_field_named(form, "name").value
105
104
  assert str(group.description or "") == self.get_first_field_named(form, "description").value
106
- assert group.is_expanded is False
107
- assert group.is_expanded == form["is_expanded"].checked
108
105
 
109
106
  self.check_children(
110
107
  form,
@@ -121,7 +118,6 @@ class TestLayersGroups(TestTreeGroup):
121
118
  new_values = {
122
119
  "name": "new_name",
123
120
  "description": "new description",
124
- "is_expanded": True,
125
121
  }
126
122
  for key, value in new_values.items():
127
123
  self.set_first_field_named(form, key, value)
@@ -144,7 +140,7 @@ class TestLayersGroups(TestTreeGroup):
144
140
  """
145
141
  groups = layer_groups_test_data["groups"]
146
142
  resp = test_app.post(
147
- "{}/new".format(self._prefix),
143
+ f"{self._prefix}/new",
148
144
  (
149
145
  ("_charset_", "UTF-8"),
150
146
  ("__formid__", "deform"),
@@ -165,7 +161,7 @@ class TestLayersGroups(TestTreeGroup):
165
161
  def test_post_new_with_children_success(self, test_app, dbsession, layer_groups_test_data):
166
162
  groups = layer_groups_test_data["groups"]
167
163
  resp = test_app.post(
168
- "{}/new".format(self._prefix),
164
+ f"{self._prefix}/new",
169
165
  (
170
166
  ("_charset_", "UTF-8"),
171
167
  ("__formid__", "deform"),
@@ -207,10 +203,12 @@ class TestLayersGroups(TestTreeGroup):
207
203
  ]
208
204
 
209
205
  def test_post_with_ancestor(self, layer_groups_test_data, test_app):
210
- """Check that ancestors are refused to avoid cycles"""
206
+ """
207
+ Check that ancestors are refused to avoid cycles.
208
+ """
211
209
  groups = layer_groups_test_data["groups"]
212
210
  resp = test_app.post(
213
- "{}/{}".format(self._prefix, groups[3].id),
211
+ f"{self._prefix}/{groups[3].id}",
214
212
  (
215
213
  ("_charset_", "UTF-8"),
216
214
  ("__formid__", "deform"),
@@ -228,7 +226,7 @@ class TestLayersGroups(TestTreeGroup):
228
226
  status=200,
229
227
  )
230
228
  assert (
231
- "Value {} does not exist in table treeitem or is not allowed to avoid cycles".format(groups[1].id)
229
+ f"Value {groups[1].id} does not exist in table treeitem or is not allowed to avoid cycles"
232
230
  == resp.html.select_one(".item-children_relation + .help-block").getText().strip()
233
231
  )
234
232
 
@@ -237,7 +235,7 @@ class TestLayersGroups(TestTreeGroup):
237
235
 
238
236
  group = layer_groups_test_data["groups"][1]
239
237
 
240
- resp = test_app.get("{}/{}/duplicate".format(self._prefix, group.id), status=200)
238
+ resp = test_app.get(f"{self._prefix}/{group.id}/duplicate", status=200)
241
239
  form = resp.form
242
240
 
243
241
  group = dbsession.query(LayerGroup).filter(LayerGroup.id == group.id).one()
@@ -245,8 +243,6 @@ class TestLayersGroups(TestTreeGroup):
245
243
  assert "" == self.get_first_field_named(form, "id").value
246
244
  assert group.name == self.get_first_field_named(form, "name").value
247
245
  assert str(group.description or "") == self.get_first_field_named(form, "description").value
248
- assert group.is_expanded is False
249
- assert group.is_expanded == form["is_expanded"].checked
250
246
 
251
247
  self.check_children(
252
248
  form,
@@ -263,7 +259,7 @@ class TestLayersGroups(TestTreeGroup):
263
259
  duplicated = dbsession.query(LayerGroup).filter(LayerGroup.name == "duplicated").one()
264
260
 
265
261
  assert str(duplicated.id) == re.match(
266
- r"http://localhost{}/(.*)\?msg_col=submit_ok".format(self._prefix), resp.location
262
+ rf"http://localhost{self._prefix}/(.*)\?msg_col=submit_ok", resp.location
267
263
  ).group(1)
268
264
  assert duplicated.id != group.id
269
265
  assert duplicated.children_relation[0].id != group.children_relation[0].id
@@ -271,11 +267,11 @@ class TestLayersGroups(TestTreeGroup):
271
267
 
272
268
  def test_unicity_validator(self, layer_groups_test_data, test_app):
273
269
  group = layer_groups_test_data["groups"][1]
274
- resp = test_app.get("{}/{}/duplicate".format(self._prefix, group.id), status=200)
270
+ resp = test_app.get(f"{self._prefix}/{group.id}/duplicate", status=200)
275
271
 
276
272
  resp = resp.form.submit("submit")
277
273
 
278
- self._check_submission_problem(resp, "{} is already used.".format(group.name))
274
+ self._check_submission_problem(resp, f"{group.name} is already used.")
279
275
 
280
276
  def test_delete(self, test_app, dbsession, layer_groups_test_data):
281
277
  from c2cgeoportal_commons.models.main import LayerGroup, LayergroupTreeitem, TreeGroup, TreeItem
@@ -292,7 +288,7 @@ class TestLayersGroups(TestTreeGroup):
292
288
  == dbsession.query(LayergroupTreeitem).filter(LayergroupTreeitem.treeitem_id == group_id).count()
293
289
  )
294
290
 
295
- test_app.delete("/admin/layer_groups/{}".format(group_id), status=200)
291
+ test_app.delete(f"/admin/layer_groups/{group_id}", status=200)
296
292
 
297
293
  dbsession.expire_all()
298
294
 
@@ -14,13 +14,13 @@ def layer_vectortiles_test_data(dbsession, transact):
14
14
 
15
15
  from c2cgeoportal_commons.models.main import LayerVectorTiles, OGCServer
16
16
 
17
- servers = [OGCServer(name="server_{}".format(i)) for i in range(0, 4)]
17
+ servers = [OGCServer(name=f"server_{i}") for i in range(0, 4)]
18
18
  for i, server in enumerate(servers):
19
- server.url = "http://wms.geo.admin.ch_{}".format(i)
19
+ server.url = f"http://wms.geo.admin.ch_{i}"
20
20
  server.image_type = "image/jpeg" if i % 2 == 0 else "image/png"
21
21
 
22
22
  def layer_builder(i):
23
- name = "layer_vectortiles_{}".format(i)
23
+ name = f"layer_vectortiles_{i}"
24
24
  layer = LayerVectorTiles(name=name)
25
25
  layer.layer = name
26
26
  layer.public = 1 == i % 2
@@ -122,11 +122,11 @@ class TestLayerVectortiles(AbstractViewsTests):
122
122
  assert str(layer.xyz or "") == form["xyz"].value
123
123
 
124
124
  interfaces = layer_vectortiles_test_data["interfaces"]
125
- assert set((interfaces[0].id, interfaces[2].id)) == set(i.id for i in layer.interfaces)
125
+ assert {interfaces[0].id, interfaces[2].id} == {i.id for i in layer.interfaces}
126
126
  self._check_interfaces(form, interfaces, layer)
127
127
 
128
128
  ras = layer_vectortiles_test_data["restrictionareas"]
129
- assert set((ras[0].id, ras[2].id)) == set(i.id for i in layer.restrictionareas)
129
+ assert {ras[0].id, ras[2].id} == {i.id for i in layer.restrictionareas}
130
130
  self._check_restrictionsareas(form, ras, layer)
131
131
 
132
132
  new_values = {
@@ -146,7 +146,7 @@ class TestLayerVectortiles(AbstractViewsTests):
146
146
 
147
147
  resp = form.submit("submit")
148
148
  assert str(layer.id) == re.match(
149
- r"http://localhost{}/(.*)\?msg_col=submit_ok".format(self._prefix), resp.location
149
+ rf"http://localhost{self._prefix}/(.*)\?msg_col=submit_ok", resp.location
150
150
  ).group(1)
151
151
 
152
152
  dbsession.expire(layer)
@@ -155,10 +155,8 @@ class TestLayerVectortiles(AbstractViewsTests):
155
155
  assert value == getattr(layer, key)
156
156
  else:
157
157
  assert str(value or "") == str(getattr(layer, key) or "")
158
- assert set([interfaces[1].id, interfaces[3].id]) == set(
159
- [interface.id for interface in layer.interfaces]
160
- )
161
- assert set([ras[1].id, ras[3].id]) == set([ra.id for ra in layer.restrictionareas])
158
+ assert {interfaces[1].id, interfaces[3].id} == {interface.id for interface in layer.interfaces}
159
+ assert {ras[1].id, ras[3].id} == {ra.id for ra in layer.restrictionareas}
162
160
 
163
161
  def test_submit_new(self, dbsession, test_app, layer_vectortiles_test_data):
164
162
  from c2cgeoportal_commons.models.main import LayerVectorTiles
@@ -185,7 +183,7 @@ class TestLayerVectortiles(AbstractViewsTests):
185
183
 
186
184
  layer = layer_vectortiles_test_data["layers"][3]
187
185
 
188
- resp = test_app.get("/admin/layers_vectortiles/{}/duplicate".format(layer.id), status=200)
186
+ resp = test_app.get(f"/admin/layers_vectortiles/{layer.id}/duplicate", status=200)
189
187
  form = resp.form
190
188
 
191
189
  assert "" == self.get_first_field_named(form, "id").value
@@ -198,7 +196,7 @@ class TestLayerVectortiles(AbstractViewsTests):
198
196
  assert str(layer.style or "") == form["style"].value
199
197
  assert str(layer.xyz or "") == form["xyz"].value
200
198
  interfaces = layer_vectortiles_test_data["interfaces"]
201
- assert set((interfaces[3].id, interfaces[1].id)) == set(i.id for i in layer.interfaces)
199
+ assert {interfaces[3].id, interfaces[1].id} == {i.id for i in layer.interfaces}
202
200
  self._check_interfaces(form, interfaces, layer)
203
201
 
204
202
  self.set_first_field_named(form, "name", "clone")
@@ -218,7 +216,7 @@ class TestLayerVectortiles(AbstractViewsTests):
218
216
 
219
217
  layer_id = dbsession.query(LayerVectorTiles.id).first().id
220
218
 
221
- test_app.delete("/admin/layers_vectortiles/{}".format(layer_id), status=200)
219
+ test_app.delete(f"/admin/layers_vectortiles/{layer_id}", status=200)
222
220
 
223
221
  assert dbsession.query(LayerVectorTiles).get(layer_id) is None
224
222
  assert dbsession.query(Layer).get(layer_id) is None