udata 9.1.4__py2.py3-none-any.whl → 9.1.4.dev30973__py2.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.

Potentially problematic release.


This version of udata might be problematic. Click here for more details.

Files changed (112) hide show
  1. tasks/__init__.py +2 -2
  2. udata/__init__.py +1 -1
  3. udata/api/__init__.py +3 -2
  4. udata/api/commands.py +1 -0
  5. udata/api/fields.py +1 -22
  6. udata/api_fields.py +37 -140
  7. udata/app.py +1 -1
  8. udata/auth/__init__.py +12 -8
  9. udata/commands/db.py +3 -3
  10. udata/commands/dcat.py +1 -1
  11. udata/commands/fixtures.py +40 -60
  12. udata/commands/purge.py +1 -2
  13. udata/commands/tests/test_fixtures.py +11 -44
  14. udata/core/activity/api.py +1 -14
  15. udata/core/activity/tasks.py +1 -1
  16. udata/core/badges/models.py +2 -6
  17. udata/core/contact_point/api.py +3 -1
  18. udata/core/dataservices/api.py +1 -37
  19. udata/core/dataservices/models.py +0 -38
  20. udata/core/dataservices/tasks.py +1 -1
  21. udata/core/dataset/events.py +1 -4
  22. udata/core/dataset/forms.py +2 -0
  23. udata/core/dataset/models.py +10 -12
  24. udata/core/dataset/rdf.py +1 -1
  25. udata/core/discussions/api.py +1 -1
  26. udata/core/discussions/models.py +2 -2
  27. udata/core/discussions/tasks.py +1 -1
  28. udata/core/metrics/models.py +1 -4
  29. udata/core/organization/api.py +7 -11
  30. udata/core/organization/api_fields.py +4 -10
  31. udata/core/organization/apiv2.py +1 -1
  32. udata/core/organization/csv.py +0 -1
  33. udata/core/organization/rdf.py +1 -4
  34. udata/core/owned.py +2 -4
  35. udata/core/post/api.py +2 -2
  36. udata/core/reuse/api.py +25 -32
  37. udata/core/reuse/api_fields.py +101 -2
  38. udata/core/reuse/apiv2.py +4 -4
  39. udata/core/reuse/forms.py +45 -0
  40. udata/core/reuse/models.py +16 -98
  41. udata/core/site/api.py +29 -3
  42. udata/core/spatial/commands.py +3 -3
  43. udata/core/spatial/factories.py +1 -1
  44. udata/core/spatial/forms.py +1 -1
  45. udata/core/spatial/models.py +2 -2
  46. udata/core/spatial/tests/test_models.py +1 -1
  47. udata/core/spatial/translations.py +1 -3
  48. udata/core/topic/api.py +2 -2
  49. udata/core/topic/apiv2.py +2 -1
  50. udata/core/user/api.py +8 -28
  51. udata/core/user/metrics.py +1 -1
  52. udata/cors.py +4 -4
  53. udata/features/transfer/api.py +2 -1
  54. udata/harvest/actions.py +1 -1
  55. udata/harvest/backends/__init__.py +1 -1
  56. udata/harvest/tasks.py +1 -0
  57. udata/harvest/tests/factories.py +2 -0
  58. udata/harvest/tests/test_base_backend.py +1 -0
  59. udata/harvest/tests/test_dcat_backend.py +17 -16
  60. udata/migrations/2020-07-24-remove-s-from-scope-oauth.py +1 -1
  61. udata/migrations/2021-07-05-remove-unused-badges.py +1 -0
  62. udata/migrations/2023-02-08-rename-internal-dates.py +2 -0
  63. udata/migrations/2024-06-11-fix-reuse-datasets-references.py +1 -0
  64. udata/mongo/datetime_fields.py +4 -11
  65. udata/mongo/document.py +0 -2
  66. udata/mongo/taglist_field.py +0 -26
  67. udata/search/commands.py +1 -1
  68. udata/search/query.py +1 -1
  69. udata/settings.py +0 -1
  70. udata/static/admin.js +36 -36
  71. udata/static/admin.js.map +1 -1
  72. udata/static/chunks/{12.576e63b7a990f8eab784.js → 12.5b900cac4417e10ef3a0.js} +2 -2
  73. udata/static/chunks/12.5b900cac4417e10ef3a0.js.map +1 -0
  74. udata/static/chunks/{28.1ef31a46255dc2bf56d1.js → 28.1759a7f57d526e6db574.js} +2 -2
  75. udata/static/chunks/28.1759a7f57d526e6db574.js.map +1 -0
  76. udata/static/common.js +1 -1
  77. udata/static/common.js.map +1 -1
  78. udata/tests/api/test_base_api.py +1 -1
  79. udata/tests/api/test_contact_points.py +4 -4
  80. udata/tests/api/test_dataservices_api.py +0 -59
  81. udata/tests/api/test_datasets_api.py +10 -10
  82. udata/tests/api/test_organizations_api.py +39 -39
  83. udata/tests/api/test_reuses_api.py +0 -49
  84. udata/tests/api/test_tags_api.py +4 -4
  85. udata/tests/api/test_transfer_api.py +1 -1
  86. udata/tests/api/test_user_api.py +0 -11
  87. udata/tests/apiv2/test_datasets.py +4 -4
  88. udata/tests/dataset/test_dataset_events.py +0 -28
  89. udata/tests/dataset/test_dataset_model.py +3 -3
  90. udata/tests/frontend/__init__.py +2 -0
  91. udata/tests/frontend/test_auth.py +1 -0
  92. udata/tests/organization/test_csv_adapter.py +2 -0
  93. udata/tests/organization/test_notifications.py +3 -3
  94. udata/tests/organization/test_organization_rdf.py +6 -31
  95. udata/tests/reuse/test_reuse_model.py +1 -0
  96. udata/tests/site/test_site_rdf.py +3 -1
  97. udata/tests/test_cors.py +3 -0
  98. udata/tests/test_owned.py +4 -4
  99. udata/tests/test_routing.py +1 -1
  100. udata/tests/test_tags.py +1 -1
  101. udata/tests/test_transfer.py +2 -1
  102. udata/tests/workers/test_jobs_commands.py +1 -1
  103. udata/utils.py +0 -12
  104. {udata-9.1.4.dist-info → udata-9.1.4.dev30973.dist-info}/METADATA +4 -16
  105. {udata-9.1.4.dist-info → udata-9.1.4.dev30973.dist-info}/RECORD +109 -109
  106. udata/static/chunks/12.576e63b7a990f8eab784.js.map +0 -1
  107. udata/static/chunks/28.1ef31a46255dc2bf56d1.js.map +0 -1
  108. udata/tests/api/test_activities_api.py +0 -69
  109. {udata-9.1.4.dist-info → udata-9.1.4.dev30973.dist-info}/LICENSE +0 -0
  110. {udata-9.1.4.dist-info → udata-9.1.4.dev30973.dist-info}/WHEEL +0 -0
  111. {udata-9.1.4.dist-info → udata-9.1.4.dev30973.dist-info}/entry_points.txt +0 -0
  112. {udata-9.1.4.dist-info → udata-9.1.4.dev30973.dist-info}/top_level.txt +0 -0
udata/static/common.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e){function __webpack_require__(a){if(c[a])return c[a].exports;var f=c[a]={exports:{},id:a,loaded:!1};return e[a].call(f.exports,f,f.exports,__webpack_require__),f.loaded=!0,f.exports}var a=window.webpackJsonp;window.webpackJsonp=function(r,b){for(var t,d,_=0,n=[];_<r.length;_++)d=r[_],f[d]&&n.push.apply(n,f[d]),f[d]=0;for(t in b){var i=b[t];switch(typeof i){case"object":e[t]=function(a){var c=a.slice(1),f=a[0];return function(a,r,b){e[f].apply(this,[a,r,b].concat(c))}}(i);break;case"function":e[t]=i;break;default:e[t]=e[i]}}for(a&&a(r,b);n.length;)n.shift().call(null,__webpack_require__);if(b[0])return c[0]=0,__webpack_require__(0)};var c={},f={31:0};__webpack_require__.e=function(e,a){if(0===f[e])return a.call(null,__webpack_require__);if(void 0!==f[e])f[e].push(a);else{f[e]=[a];var c=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.src=__webpack_require__.p+"chunks/"+e+"."+{0:"8f152ff3f1e15e3d8778",1:"c53dfc91009cfdf4583b",2:"c6dba6a3f04d53321e86",3:"31f4515503a814e0e3a3",4:"3720aa269a60fa6d03b4",5:"d17ff266ecc1ad0331fb",6:"0db5d3ff22944de7edd5",7:"6ce1bc0456cf60b71a71",8:"292c6a157d71f0b21b6f",9:"8ad948dd393d38f07a7a",10:"c1c9496ebfc8949f3de2",11:"18f1cc16362b76373c40",12:"576e63b7a990f8eab784",13:"fd1ca1cf5b2c1854ed51",14:"42393a4d555321f07b8b",15:"7de380008f4ec6ea4b5b",16:"6727d8aca9393baa855c",17:"4687eae5e18d3049fe7b",18:"b7098bfe5401f75973fa",19:"2061dca8438f415029a3",20:"17e9e766625991aa0a7b",21:"2b48c7e5fe59775d5eb3",22:"2a919b7f6014457264e8",23:"3e0c3e2e54035b03f0cd",24:"90ea877940aa6e51aa05",25:"f58e4af656779957db54",26:"980f1773d9ad3068ab73",27:"d27b63112823e700bf20",28:"1ef31a46255dc2bf56d1",29:"056b71a60b1ba45eb81b",30:"01f57358f352314e7df0",32:"92a026dcad120ccdf15f",33:"c1ee77b51bb867f3d7cd"}[e]+".js",c.appendChild(r)}},__webpack_require__.m=e,__webpack_require__.c=c,__webpack_require__.p="/static/"}(function(e){for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))switch(typeof e[a]){case"function":break;case"object":e[a]=function(a){var c=a.slice(1),f=e[a[0]];return function(e,a,r){f.apply(this,[e,a,r].concat(c))}}(e[a]);break;default:e[a]=e[e[a]]}return e}([]));
1
+ !function(e){function __webpack_require__(a){if(c[a])return c[a].exports;var f=c[a]={exports:{},id:a,loaded:!1};return e[a].call(f.exports,f,f.exports,__webpack_require__),f.loaded=!0,f.exports}var a=window.webpackJsonp;window.webpackJsonp=function(r,b){for(var t,d,_=0,n=[];_<r.length;_++)d=r[_],f[d]&&n.push.apply(n,f[d]),f[d]=0;for(t in b){var i=b[t];switch(typeof i){case"object":e[t]=function(a){var c=a.slice(1),f=a[0];return function(a,r,b){e[f].apply(this,[a,r,b].concat(c))}}(i);break;case"function":e[t]=i;break;default:e[t]=e[i]}}for(a&&a(r,b);n.length;)n.shift().call(null,__webpack_require__);if(b[0])return c[0]=0,__webpack_require__(0)};var c={},f={31:0};__webpack_require__.e=function(e,a){if(0===f[e])return a.call(null,__webpack_require__);if(void 0!==f[e])f[e].push(a);else{f[e]=[a];var c=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.src=__webpack_require__.p+"chunks/"+e+"."+{0:"8f152ff3f1e15e3d8778",1:"c53dfc91009cfdf4583b",2:"c6dba6a3f04d53321e86",3:"31f4515503a814e0e3a3",4:"3720aa269a60fa6d03b4",5:"d17ff266ecc1ad0331fb",6:"0db5d3ff22944de7edd5",7:"6ce1bc0456cf60b71a71",8:"292c6a157d71f0b21b6f",9:"8ad948dd393d38f07a7a",10:"c1c9496ebfc8949f3de2",11:"18f1cc16362b76373c40",12:"5b900cac4417e10ef3a0",13:"fd1ca1cf5b2c1854ed51",14:"42393a4d555321f07b8b",15:"7de380008f4ec6ea4b5b",16:"6727d8aca9393baa855c",17:"4687eae5e18d3049fe7b",18:"b7098bfe5401f75973fa",19:"2061dca8438f415029a3",20:"17e9e766625991aa0a7b",21:"2b48c7e5fe59775d5eb3",22:"2a919b7f6014457264e8",23:"3e0c3e2e54035b03f0cd",24:"90ea877940aa6e51aa05",25:"f58e4af656779957db54",26:"980f1773d9ad3068ab73",27:"d27b63112823e700bf20",28:"1759a7f57d526e6db574",29:"056b71a60b1ba45eb81b",30:"01f57358f352314e7df0",32:"81f86853bd2204d5f185",33:"c1ee77b51bb867f3d7cd"}[e]+".js",c.appendChild(r)}},__webpack_require__.m=e,__webpack_require__.c=c,__webpack_require__.p="/static/"}(function(e){for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))switch(typeof e[a]){case"function":break;case"object":e[a]=function(a){var c=a.slice(1),f=e[a[0]];return function(e,a,r){f.apply(this,[e,a,r].concat(c))}}(e[a]);break;default:e[a]=e[e[a]]}return e}([]));
2
2
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///common.js","webpack:///webpack/bootstrap ca380b10791e5e6eaa83"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","parentJsonpFunction","window","chunkIds","moreModules","chunkId","i","callbacks","length","installedChunks","push","apply","_m","args","slice","templateId","a","b","c","this","concat","shift","31","e","callback","undefined","head","document","getElementsByTagName","script","createElement","type","charset","async","src","p","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","32","33","appendChild","m","Object","prototype","hasOwnProperty","fn"],"mappings":"CAAS,SAAUA,GCwDnB,QAAAC,qBAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,qBAGAI,EAAAE,QAAA,EAGAF,EAAAD,QA3EA,GAAAK,GAAAC,OAAA,YACAA,QAAA,sBAAAC,EAAAC,GAIA,IADA,GAAAV,GAAAW,EAAAC,EAAA,EAAAC,KACQD,EAAAH,EAAAK,OAAoBF,IAC5BD,EAAAF,EAAAG,GACAG,EAAAJ,IACAE,EAAAG,KAAAC,MAAAJ,EAAAE,EAAAJ,IACAI,EAAAJ,GAAA,CAEA,KAAAX,IAAAU,GAAA,CACA,GAAAQ,GAAAR,EAAAV,EAGA,cAAAkB,IACA,aAEApB,EAAAE,GAAA,SAAAkB,GACA,GAAAC,GAAAD,EAAAE,MAAA,GAAAC,EAAAH,EAAA,EACA,iBAAAI,EAAAC,EAAAC,GACA1B,EAAAuB,GAAAJ,MAAAQ,MAAAH,EAAAC,EAAAC,GAAAE,OAAAP,MAEMD,EACN,MACA,gBAEApB,EAAAE,GAAAkB,CACA,MACA,SAEApB,EAAAE,GAAAF,EAAAoB,IAKA,IADAX,KAAAE,EAAAC,GACAG,EAAAC,QACAD,EAAAc,QAAArB,KAAA,KAAAP,oBACA,IAAAW,EAAA,GAEA,MADAT,GAAA,KACAF,oBAAA,GAKA,IAAAE,MAKAc,GACAa,GAAA,EA6BA7B,qBAAA8B,EAAA,SAAAlB,EAAAmB,GAEA,OAAAf,EAAAJ,GACA,MAAAmB,GAAAxB,KAAA,KAAAP,oBAGA,IAAAgC,SAAAhB,EAAAJ,GACAI,EAAAJ,GAAAK,KAAAc,OACI,CAEJf,EAAAJ,IAAAmB,EACA,IAAAE,GAAAC,SAAAC,qBAAA,WACAC,EAAAF,SAAAG,cAAA,SACAD,GAAAE,KAAA,kBACAF,EAAAG,QAAA,QACAH,EAAAI,OAAA,EAEAJ,EAAAK,IAAAzC,oBAAA0C,EAAA,UAAA9B,EAAA,KAAsE+B,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,wBAAk5B/D,GAAA,MACx9BqB,EAAA2C,YAAAxC,KAKApC,oBAAA6E,EAAA9E,EAGAC,oBAAAyB,EAAAvB,EAGAF,oBAAA0C,EAAA,YDIW,SAAS3C,GAEnB,IAAI,GAAIc,KAAKd,GACZ,GAAG+E,OAAOC,UAAUC,eAAezE,KAAKR,EAASc,GAChD,aAAcd,GAAQc,IACtB,IAAK,WAAY,KACjB,KAAK,SAEJd,EAAQc,GAAM,SAASM,GACtB,GAAIC,GAAOD,EAAGE,MAAM,GAAI4D,EAAKlF,EAAQoB,EAAG,GACxC,OAAO,UAAUI,EAAEC,EAAEC,GACpBwD,EAAG/D,MAAMQ,MAAOH,EAAEC,EAAEC,GAAGE,OAAOP,MAE9BrB,EAAQc,GACV,MACD,SAECd,EAAQc,GAAKd,EAAQA,EAAQc,IAKhC,MAAOd","file":"common.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// install a JSONP callback for chunk loading\n/******/ \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n/******/ \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules) {\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/******/ \t\tvar moduleId, chunkId, i = 0, callbacks = [];\n/******/ \t\tfor(;i < chunkIds.length; i++) {\n/******/ \t\t\tchunkId = chunkIds[i];\n/******/ \t\t\tif(installedChunks[chunkId])\n/******/ \t\t\t\tcallbacks.push.apply(callbacks, installedChunks[chunkId]);\n/******/ \t\t\tinstalledChunks[chunkId] = 0;\n/******/ \t\t}\n/******/ \t\tfor(moduleId in moreModules) {\n/******/ \t\t\tvar _m = moreModules[moduleId];\n/******/\n/******/ \t\t\t// Check if module is deduplicated\n/******/ \t\t\tswitch(typeof _m) {\n/******/ \t\t\tcase \"object\":\n/******/ \t\t\t\t// Module can be created from a template\n/******/ \t\t\t\tmodules[moduleId] = (function(_m) {\n/******/ \t\t\t\t\tvar args = _m.slice(1), templateId = _m[0];\n/******/ \t\t\t\t\treturn function (a,b,c) {\n/******/ \t\t\t\t\t\tmodules[templateId].apply(this, [a,b,c].concat(args));\n/******/ \t\t\t\t\t};\n/******/ \t\t\t\t}(_m));\n/******/ \t\t\t\tbreak;\n/******/ \t\t\tcase \"function\":\n/******/ \t\t\t\t// Normal module\n/******/ \t\t\t\tmodules[moduleId] = _m;\n/******/ \t\t\t\tbreak;\n/******/ \t\t\tdefault:\n/******/ \t\t\t\t// Module is a copy of another module\n/******/ \t\t\t\tmodules[moduleId] = modules[_m];\n/******/ \t\t\t\tbreak;\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);\n/******/ \t\twhile(callbacks.length)\n/******/ \t\t\tcallbacks.shift().call(null, __webpack_require__);\n/******/ \t\tif(moreModules[0]) {\n/******/ \t\t\tinstalledModules[0] = 0;\n/******/ \t\t\treturn __webpack_require__(0);\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// object to store loaded and loading chunks\n/******/ \t// \"0\" means \"already loaded\"\n/******/ \t// Array means \"loading\", array contains callbacks\n/******/ \tvar installedChunks = {\n/******/ \t\t31:0\n/******/ \t};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/ \t// This file contains only the entry chunk.\n/******/ \t// The chunk loading function for additional chunks\n/******/ \t__webpack_require__.e = function requireEnsure(chunkId, callback) {\n/******/ \t\t// \"0\" is the signal for \"already loaded\"\n/******/ \t\tif(installedChunks[chunkId] === 0)\n/******/ \t\t\treturn callback.call(null, __webpack_require__);\n/******/\n/******/ \t\t// an array means \"currently loading\".\n/******/ \t\tif(installedChunks[chunkId] !== undefined) {\n/******/ \t\t\tinstalledChunks[chunkId].push(callback);\n/******/ \t\t} else {\n/******/ \t\t\t// start chunk loading\n/******/ \t\t\tinstalledChunks[chunkId] = [callback];\n/******/ \t\t\tvar head = document.getElementsByTagName('head')[0];\n/******/ \t\t\tvar script = document.createElement('script');\n/******/ \t\t\tscript.type = 'text/javascript';\n/******/ \t\t\tscript.charset = 'utf-8';\n/******/ \t\t\tscript.async = true;\n/******/\n/******/ \t\t\tscript.src = __webpack_require__.p + \"chunks/\" + chunkId + \".\" + {\"0\":\"8f152ff3f1e15e3d8778\",\"1\":\"c53dfc91009cfdf4583b\",\"2\":\"c6dba6a3f04d53321e86\",\"3\":\"31f4515503a814e0e3a3\",\"4\":\"3720aa269a60fa6d03b4\",\"5\":\"d17ff266ecc1ad0331fb\",\"6\":\"0db5d3ff22944de7edd5\",\"7\":\"6ce1bc0456cf60b71a71\",\"8\":\"292c6a157d71f0b21b6f\",\"9\":\"8ad948dd393d38f07a7a\",\"10\":\"c1c9496ebfc8949f3de2\",\"11\":\"18f1cc16362b76373c40\",\"12\":\"576e63b7a990f8eab784\",\"13\":\"fd1ca1cf5b2c1854ed51\",\"14\":\"42393a4d555321f07b8b\",\"15\":\"7de380008f4ec6ea4b5b\",\"16\":\"6727d8aca9393baa855c\",\"17\":\"4687eae5e18d3049fe7b\",\"18\":\"b7098bfe5401f75973fa\",\"19\":\"2061dca8438f415029a3\",\"20\":\"17e9e766625991aa0a7b\",\"21\":\"2b48c7e5fe59775d5eb3\",\"22\":\"2a919b7f6014457264e8\",\"23\":\"3e0c3e2e54035b03f0cd\",\"24\":\"90ea877940aa6e51aa05\",\"25\":\"f58e4af656779957db54\",\"26\":\"980f1773d9ad3068ab73\",\"27\":\"d27b63112823e700bf20\",\"28\":\"1ef31a46255dc2bf56d1\",\"29\":\"056b71a60b1ba45eb81b\",\"30\":\"01f57358f352314e7df0\",\"32\":\"92a026dcad120ccdf15f\",\"33\":\"c1ee77b51bb867f3d7cd\"}[chunkId] + \".js\";\n/******/ \t\t\thead.appendChild(script);\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/static/\";\n/******/ })\n/************************************************************************/\n/******/ ((function(modules) {\n\t// Check all modules for deduplicated modules\n\tfor(var i in modules) {\n\t\tif(Object.prototype.hasOwnProperty.call(modules, i)) {\n\t\t\tswitch(typeof modules[i]) {\n\t\t\tcase \"function\": break;\n\t\t\tcase \"object\":\n\t\t\t\t// Module can be created from a template\n\t\t\t\tmodules[i] = (function(_m) {\n\t\t\t\t\tvar args = _m.slice(1), fn = modules[_m[0]];\n\t\t\t\t\treturn function (a,b,c) {\n\t\t\t\t\t\tfn.apply(this, [a,b,c].concat(args));\n\t\t\t\t\t};\n\t\t\t\t}(modules[i]));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Module is a copy of another module\n\t\t\t\tmodules[i] = modules[modules[i]];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn modules;\n}([])));\n\n\n/** WEBPACK FOOTER **\n ** common.js\n **/"," \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, callbacks = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId])\n \t\t\t\tcallbacks.push.apply(callbacks, installedChunks[chunkId]);\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tvar _m = moreModules[moduleId];\n\n \t\t\t// Check if module is deduplicated\n \t\t\tswitch(typeof _m) {\n \t\t\tcase \"object\":\n \t\t\t\t// Module can be created from a template\n \t\t\t\tmodules[moduleId] = (function(_m) {\n \t\t\t\t\tvar args = _m.slice(1), templateId = _m[0];\n \t\t\t\t\treturn function (a,b,c) {\n \t\t\t\t\t\tmodules[templateId].apply(this, [a,b,c].concat(args));\n \t\t\t\t\t};\n \t\t\t\t}(_m));\n \t\t\t\tbreak;\n \t\t\tcase \"function\":\n \t\t\t\t// Normal module\n \t\t\t\tmodules[moduleId] = _m;\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\t// Module is a copy of another module\n \t\t\t\tmodules[moduleId] = modules[_m];\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);\n \t\twhile(callbacks.length)\n \t\t\tcallbacks.shift().call(null, __webpack_require__);\n \t\tif(moreModules[0]) {\n \t\t\tinstalledModules[0] = 0;\n \t\t\treturn __webpack_require__(0);\n \t\t}\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// \"0\" means \"already loaded\"\n \t// Array means \"loading\", array contains callbacks\n \tvar installedChunks = {\n \t\t31:0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId, callback) {\n \t\t// \"0\" is the signal for \"already loaded\"\n \t\tif(installedChunks[chunkId] === 0)\n \t\t\treturn callback.call(null, __webpack_require__);\n\n \t\t// an array means \"currently loading\".\n \t\tif(installedChunks[chunkId] !== undefined) {\n \t\t\tinstalledChunks[chunkId].push(callback);\n \t\t} else {\n \t\t\t// start chunk loading\n \t\t\tinstalledChunks[chunkId] = [callback];\n \t\t\tvar head = document.getElementsByTagName('head')[0];\n \t\t\tvar script = document.createElement('script');\n \t\t\tscript.type = 'text/javascript';\n \t\t\tscript.charset = 'utf-8';\n \t\t\tscript.async = true;\n\n \t\t\tscript.src = __webpack_require__.p + \"chunks/\" + chunkId + \".\" + {\"0\":\"8f152ff3f1e15e3d8778\",\"1\":\"c53dfc91009cfdf4583b\",\"2\":\"c6dba6a3f04d53321e86\",\"3\":\"31f4515503a814e0e3a3\",\"4\":\"3720aa269a60fa6d03b4\",\"5\":\"d17ff266ecc1ad0331fb\",\"6\":\"0db5d3ff22944de7edd5\",\"7\":\"6ce1bc0456cf60b71a71\",\"8\":\"292c6a157d71f0b21b6f\",\"9\":\"8ad948dd393d38f07a7a\",\"10\":\"c1c9496ebfc8949f3de2\",\"11\":\"18f1cc16362b76373c40\",\"12\":\"576e63b7a990f8eab784\",\"13\":\"fd1ca1cf5b2c1854ed51\",\"14\":\"42393a4d555321f07b8b\",\"15\":\"7de380008f4ec6ea4b5b\",\"16\":\"6727d8aca9393baa855c\",\"17\":\"4687eae5e18d3049fe7b\",\"18\":\"b7098bfe5401f75973fa\",\"19\":\"2061dca8438f415029a3\",\"20\":\"17e9e766625991aa0a7b\",\"21\":\"2b48c7e5fe59775d5eb3\",\"22\":\"2a919b7f6014457264e8\",\"23\":\"3e0c3e2e54035b03f0cd\",\"24\":\"90ea877940aa6e51aa05\",\"25\":\"f58e4af656779957db54\",\"26\":\"980f1773d9ad3068ab73\",\"27\":\"d27b63112823e700bf20\",\"28\":\"1ef31a46255dc2bf56d1\",\"29\":\"056b71a60b1ba45eb81b\",\"30\":\"01f57358f352314e7df0\",\"32\":\"92a026dcad120ccdf15f\",\"33\":\"c1ee77b51bb867f3d7cd\"}[chunkId] + \".js\";\n \t\t\thead.appendChild(script);\n \t\t}\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/static/\";\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap ca380b10791e5e6eaa83\n **/"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///common.js","webpack:///webpack/bootstrap c9c097f09cc6a2d3f2e7"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","parentJsonpFunction","window","chunkIds","moreModules","chunkId","i","callbacks","length","installedChunks","push","apply","_m","args","slice","templateId","a","b","c","this","concat","shift","31","e","callback","undefined","head","document","getElementsByTagName","script","createElement","type","charset","async","src","p","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","32","33","appendChild","m","Object","prototype","hasOwnProperty","fn"],"mappings":"CAAS,SAAUA,GCwDnB,QAAAC,qBAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,qBAGAI,EAAAE,QAAA,EAGAF,EAAAD,QA3EA,GAAAK,GAAAC,OAAA,YACAA,QAAA,sBAAAC,EAAAC,GAIA,IADA,GAAAV,GAAAW,EAAAC,EAAA,EAAAC,KACQD,EAAAH,EAAAK,OAAoBF,IAC5BD,EAAAF,EAAAG,GACAG,EAAAJ,IACAE,EAAAG,KAAAC,MAAAJ,EAAAE,EAAAJ,IACAI,EAAAJ,GAAA,CAEA,KAAAX,IAAAU,GAAA,CACA,GAAAQ,GAAAR,EAAAV,EAGA,cAAAkB,IACA,aAEApB,EAAAE,GAAA,SAAAkB,GACA,GAAAC,GAAAD,EAAAE,MAAA,GAAAC,EAAAH,EAAA,EACA,iBAAAI,EAAAC,EAAAC,GACA1B,EAAAuB,GAAAJ,MAAAQ,MAAAH,EAAAC,EAAAC,GAAAE,OAAAP,MAEMD,EACN,MACA,gBAEApB,EAAAE,GAAAkB,CACA,MACA,SAEApB,EAAAE,GAAAF,EAAAoB,IAKA,IADAX,KAAAE,EAAAC,GACAG,EAAAC,QACAD,EAAAc,QAAArB,KAAA,KAAAP,oBACA,IAAAW,EAAA,GAEA,MADAT,GAAA,KACAF,oBAAA,GAKA,IAAAE,MAKAc,GACAa,GAAA,EA6BA7B,qBAAA8B,EAAA,SAAAlB,EAAAmB,GAEA,OAAAf,EAAAJ,GACA,MAAAmB,GAAAxB,KAAA,KAAAP,oBAGA,IAAAgC,SAAAhB,EAAAJ,GACAI,EAAAJ,GAAAK,KAAAc,OACI,CAEJf,EAAAJ,IAAAmB,EACA,IAAAE,GAAAC,SAAAC,qBAAA,WACAC,EAAAF,SAAAG,cAAA,SACAD,GAAAE,KAAA,kBACAF,EAAAG,QAAA,QACAH,EAAAI,OAAA,EAEAJ,EAAAK,IAAAzC,oBAAA0C,EAAA,UAAA9B,EAAA,KAAsE+B,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,uBAAAC,GAAA,wBAAk5B/D,GAAA,MACx9BqB,EAAA2C,YAAAxC,KAKApC,oBAAA6E,EAAA9E,EAGAC,oBAAAyB,EAAAvB,EAGAF,oBAAA0C,EAAA,YDIW,SAAS3C,GAEnB,IAAI,GAAIc,KAAKd,GACZ,GAAG+E,OAAOC,UAAUC,eAAezE,KAAKR,EAASc,GAChD,aAAcd,GAAQc,IACtB,IAAK,WAAY,KACjB,KAAK,SAEJd,EAAQc,GAAM,SAASM,GACtB,GAAIC,GAAOD,EAAGE,MAAM,GAAI4D,EAAKlF,EAAQoB,EAAG,GACxC,OAAO,UAAUI,EAAEC,EAAEC,GACpBwD,EAAG/D,MAAMQ,MAAOH,EAAEC,EAAEC,GAAGE,OAAOP,MAE9BrB,EAAQc,GACV,MACD,SAECd,EAAQc,GAAKd,EAAQA,EAAQc,IAKhC,MAAOd","file":"common.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// install a JSONP callback for chunk loading\n/******/ \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n/******/ \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules) {\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/******/ \t\tvar moduleId, chunkId, i = 0, callbacks = [];\n/******/ \t\tfor(;i < chunkIds.length; i++) {\n/******/ \t\t\tchunkId = chunkIds[i];\n/******/ \t\t\tif(installedChunks[chunkId])\n/******/ \t\t\t\tcallbacks.push.apply(callbacks, installedChunks[chunkId]);\n/******/ \t\t\tinstalledChunks[chunkId] = 0;\n/******/ \t\t}\n/******/ \t\tfor(moduleId in moreModules) {\n/******/ \t\t\tvar _m = moreModules[moduleId];\n/******/\n/******/ \t\t\t// Check if module is deduplicated\n/******/ \t\t\tswitch(typeof _m) {\n/******/ \t\t\tcase \"object\":\n/******/ \t\t\t\t// Module can be created from a template\n/******/ \t\t\t\tmodules[moduleId] = (function(_m) {\n/******/ \t\t\t\t\tvar args = _m.slice(1), templateId = _m[0];\n/******/ \t\t\t\t\treturn function (a,b,c) {\n/******/ \t\t\t\t\t\tmodules[templateId].apply(this, [a,b,c].concat(args));\n/******/ \t\t\t\t\t};\n/******/ \t\t\t\t}(_m));\n/******/ \t\t\t\tbreak;\n/******/ \t\t\tcase \"function\":\n/******/ \t\t\t\t// Normal module\n/******/ \t\t\t\tmodules[moduleId] = _m;\n/******/ \t\t\t\tbreak;\n/******/ \t\t\tdefault:\n/******/ \t\t\t\t// Module is a copy of another module\n/******/ \t\t\t\tmodules[moduleId] = modules[_m];\n/******/ \t\t\t\tbreak;\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);\n/******/ \t\twhile(callbacks.length)\n/******/ \t\t\tcallbacks.shift().call(null, __webpack_require__);\n/******/ \t\tif(moreModules[0]) {\n/******/ \t\t\tinstalledModules[0] = 0;\n/******/ \t\t\treturn __webpack_require__(0);\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// object to store loaded and loading chunks\n/******/ \t// \"0\" means \"already loaded\"\n/******/ \t// Array means \"loading\", array contains callbacks\n/******/ \tvar installedChunks = {\n/******/ \t\t31:0\n/******/ \t};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/ \t// This file contains only the entry chunk.\n/******/ \t// The chunk loading function for additional chunks\n/******/ \t__webpack_require__.e = function requireEnsure(chunkId, callback) {\n/******/ \t\t// \"0\" is the signal for \"already loaded\"\n/******/ \t\tif(installedChunks[chunkId] === 0)\n/******/ \t\t\treturn callback.call(null, __webpack_require__);\n/******/\n/******/ \t\t// an array means \"currently loading\".\n/******/ \t\tif(installedChunks[chunkId] !== undefined) {\n/******/ \t\t\tinstalledChunks[chunkId].push(callback);\n/******/ \t\t} else {\n/******/ \t\t\t// start chunk loading\n/******/ \t\t\tinstalledChunks[chunkId] = [callback];\n/******/ \t\t\tvar head = document.getElementsByTagName('head')[0];\n/******/ \t\t\tvar script = document.createElement('script');\n/******/ \t\t\tscript.type = 'text/javascript';\n/******/ \t\t\tscript.charset = 'utf-8';\n/******/ \t\t\tscript.async = true;\n/******/\n/******/ \t\t\tscript.src = __webpack_require__.p + \"chunks/\" + chunkId + \".\" + {\"0\":\"8f152ff3f1e15e3d8778\",\"1\":\"c53dfc91009cfdf4583b\",\"2\":\"c6dba6a3f04d53321e86\",\"3\":\"31f4515503a814e0e3a3\",\"4\":\"3720aa269a60fa6d03b4\",\"5\":\"d17ff266ecc1ad0331fb\",\"6\":\"0db5d3ff22944de7edd5\",\"7\":\"6ce1bc0456cf60b71a71\",\"8\":\"292c6a157d71f0b21b6f\",\"9\":\"8ad948dd393d38f07a7a\",\"10\":\"c1c9496ebfc8949f3de2\",\"11\":\"18f1cc16362b76373c40\",\"12\":\"5b900cac4417e10ef3a0\",\"13\":\"fd1ca1cf5b2c1854ed51\",\"14\":\"42393a4d555321f07b8b\",\"15\":\"7de380008f4ec6ea4b5b\",\"16\":\"6727d8aca9393baa855c\",\"17\":\"4687eae5e18d3049fe7b\",\"18\":\"b7098bfe5401f75973fa\",\"19\":\"2061dca8438f415029a3\",\"20\":\"17e9e766625991aa0a7b\",\"21\":\"2b48c7e5fe59775d5eb3\",\"22\":\"2a919b7f6014457264e8\",\"23\":\"3e0c3e2e54035b03f0cd\",\"24\":\"90ea877940aa6e51aa05\",\"25\":\"f58e4af656779957db54\",\"26\":\"980f1773d9ad3068ab73\",\"27\":\"d27b63112823e700bf20\",\"28\":\"1759a7f57d526e6db574\",\"29\":\"056b71a60b1ba45eb81b\",\"30\":\"01f57358f352314e7df0\",\"32\":\"81f86853bd2204d5f185\",\"33\":\"c1ee77b51bb867f3d7cd\"}[chunkId] + \".js\";\n/******/ \t\t\thead.appendChild(script);\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/static/\";\n/******/ })\n/************************************************************************/\n/******/ ((function(modules) {\n\t// Check all modules for deduplicated modules\n\tfor(var i in modules) {\n\t\tif(Object.prototype.hasOwnProperty.call(modules, i)) {\n\t\t\tswitch(typeof modules[i]) {\n\t\t\tcase \"function\": break;\n\t\t\tcase \"object\":\n\t\t\t\t// Module can be created from a template\n\t\t\t\tmodules[i] = (function(_m) {\n\t\t\t\t\tvar args = _m.slice(1), fn = modules[_m[0]];\n\t\t\t\t\treturn function (a,b,c) {\n\t\t\t\t\t\tfn.apply(this, [a,b,c].concat(args));\n\t\t\t\t\t};\n\t\t\t\t}(modules[i]));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Module is a copy of another module\n\t\t\t\tmodules[i] = modules[modules[i]];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn modules;\n}([])));\n\n\n/** WEBPACK FOOTER **\n ** common.js\n **/"," \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, callbacks = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId])\n \t\t\t\tcallbacks.push.apply(callbacks, installedChunks[chunkId]);\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tvar _m = moreModules[moduleId];\n\n \t\t\t// Check if module is deduplicated\n \t\t\tswitch(typeof _m) {\n \t\t\tcase \"object\":\n \t\t\t\t// Module can be created from a template\n \t\t\t\tmodules[moduleId] = (function(_m) {\n \t\t\t\t\tvar args = _m.slice(1), templateId = _m[0];\n \t\t\t\t\treturn function (a,b,c) {\n \t\t\t\t\t\tmodules[templateId].apply(this, [a,b,c].concat(args));\n \t\t\t\t\t};\n \t\t\t\t}(_m));\n \t\t\t\tbreak;\n \t\t\tcase \"function\":\n \t\t\t\t// Normal module\n \t\t\t\tmodules[moduleId] = _m;\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\t// Module is a copy of another module\n \t\t\t\tmodules[moduleId] = modules[_m];\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);\n \t\twhile(callbacks.length)\n \t\t\tcallbacks.shift().call(null, __webpack_require__);\n \t\tif(moreModules[0]) {\n \t\t\tinstalledModules[0] = 0;\n \t\t\treturn __webpack_require__(0);\n \t\t}\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// \"0\" means \"already loaded\"\n \t// Array means \"loading\", array contains callbacks\n \tvar installedChunks = {\n \t\t31:0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId, callback) {\n \t\t// \"0\" is the signal for \"already loaded\"\n \t\tif(installedChunks[chunkId] === 0)\n \t\t\treturn callback.call(null, __webpack_require__);\n\n \t\t// an array means \"currently loading\".\n \t\tif(installedChunks[chunkId] !== undefined) {\n \t\t\tinstalledChunks[chunkId].push(callback);\n \t\t} else {\n \t\t\t// start chunk loading\n \t\t\tinstalledChunks[chunkId] = [callback];\n \t\t\tvar head = document.getElementsByTagName('head')[0];\n \t\t\tvar script = document.createElement('script');\n \t\t\tscript.type = 'text/javascript';\n \t\t\tscript.charset = 'utf-8';\n \t\t\tscript.async = true;\n\n \t\t\tscript.src = __webpack_require__.p + \"chunks/\" + chunkId + \".\" + {\"0\":\"8f152ff3f1e15e3d8778\",\"1\":\"c53dfc91009cfdf4583b\",\"2\":\"c6dba6a3f04d53321e86\",\"3\":\"31f4515503a814e0e3a3\",\"4\":\"3720aa269a60fa6d03b4\",\"5\":\"d17ff266ecc1ad0331fb\",\"6\":\"0db5d3ff22944de7edd5\",\"7\":\"6ce1bc0456cf60b71a71\",\"8\":\"292c6a157d71f0b21b6f\",\"9\":\"8ad948dd393d38f07a7a\",\"10\":\"c1c9496ebfc8949f3de2\",\"11\":\"18f1cc16362b76373c40\",\"12\":\"5b900cac4417e10ef3a0\",\"13\":\"fd1ca1cf5b2c1854ed51\",\"14\":\"42393a4d555321f07b8b\",\"15\":\"7de380008f4ec6ea4b5b\",\"16\":\"6727d8aca9393baa855c\",\"17\":\"4687eae5e18d3049fe7b\",\"18\":\"b7098bfe5401f75973fa\",\"19\":\"2061dca8438f415029a3\",\"20\":\"17e9e766625991aa0a7b\",\"21\":\"2b48c7e5fe59775d5eb3\",\"22\":\"2a919b7f6014457264e8\",\"23\":\"3e0c3e2e54035b03f0cd\",\"24\":\"90ea877940aa6e51aa05\",\"25\":\"f58e4af656779957db54\",\"26\":\"980f1773d9ad3068ab73\",\"27\":\"d27b63112823e700bf20\",\"28\":\"1759a7f57d526e6db574\",\"29\":\"056b71a60b1ba45eb81b\",\"30\":\"01f57358f352314e7df0\",\"32\":\"81f86853bd2204d5f185\",\"33\":\"c1ee77b51bb867f3d7cd\"}[chunkId] + \".js\";\n \t\t\thead.appendChild(script);\n \t\t}\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/static/\";\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap c9c097f09cc6a2d3f2e7\n **/"],"sourceRoot":""}
@@ -1,7 +1,7 @@
1
1
  from flask import url_for
2
2
 
3
3
  from udata.api import API, api
4
- from udata.forms import Form
4
+ from udata.forms import Form, fields
5
5
 
6
6
  from . import APITestCase
7
7
 
@@ -14,18 +14,18 @@ class ContactPointAPITest:
14
14
  modules = []
15
15
 
16
16
  def test_contact_point_api_update(self, api):
17
- api.login()
17
+ user = api.login()
18
18
  contact_point = ContactPointFactory()
19
19
  data = contact_point.to_dict()
20
20
  data["email"] = "new.email@newdomain.com"
21
21
  response = api.put(url_for("api.contact_point", contact_point=contact_point), data)
22
22
  assert200(response)
23
- assert ContactPoint.objects.count() == 1
23
+ assert ContactPoint.objects.count() is 1
24
24
  assert ContactPoint.objects.first().email == "new.email@newdomain.com"
25
25
 
26
26
  def test_contact_point_api_delete(self, api):
27
- api.login()
27
+ user = api.login()
28
28
  contact_point = ContactPointFactory()
29
29
  response = api.delete(url_for("api.contact_point", contact_point=contact_point))
30
30
  assert204(response)
31
- assert ContactPoint.objects.count() == 0
31
+ assert ContactPoint.objects.count() is 0
@@ -1,16 +1,11 @@
1
- from xml.etree.ElementTree import XML
2
-
3
- import pytest
4
1
  from flask import url_for
5
2
 
6
- from udata.core.dataservices.factories import DataserviceFactory
7
3
  from udata.core.dataservices.models import Dataservice
8
4
  from udata.core.dataset.factories import DatasetFactory, LicenseFactory
9
5
  from udata.core.organization.factories import OrganizationFactory
10
6
  from udata.core.organization.models import Member
11
7
  from udata.core.user.factories import UserFactory
12
8
  from udata.i18n import gettext as _
13
- from udata.tests.helpers import assert200, assert_redirects
14
9
 
15
10
  from . import APITestCase
16
11
 
@@ -316,57 +311,3 @@ class DataserviceAPITest(APITestCase):
316
311
  dataservice = Dataservice.objects(id=response.json["id"]).first()
317
312
  self.assertEqual(dataservice.owner, None)
318
313
  self.assertEqual(dataservice.organization.id, me_org.id)
319
-
320
-
321
- @pytest.mark.frontend
322
- class DataserviceRdfViewsTest:
323
- def test_rdf_default_to_jsonld(self, client):
324
- dataservice = DataserviceFactory()
325
- expected = url_for("api.dataservice_rdf_format", dataservice=dataservice.id, format="json")
326
- response = client.get(url_for("api.dataservice_rdf", dataservice=dataservice))
327
- assert_redirects(response, expected)
328
-
329
- def test_rdf_perform_content_negociation(self, client):
330
- dataservice = DataserviceFactory()
331
- expected = url_for("api.dataservice_rdf_format", dataservice=dataservice.id, format="xml")
332
- url = url_for("api.dataservice_rdf", dataservice=dataservice)
333
- headers = {"accept": "application/xml"}
334
- response = client.get(url, headers=headers)
335
- assert_redirects(response, expected)
336
-
337
- def test_rdf_perform_content_negociation_response(self, client):
338
- """Check we have valid XML as output"""
339
- dataservice = DataserviceFactory()
340
- url = url_for("api.dataservice_rdf", dataservice=dataservice)
341
- headers = {"accept": "application/xml"}
342
- response = client.get(url, headers=headers, follow_redirects=True)
343
- element = XML(response.data)
344
- assert element.tag == "{http://www.w3.org/1999/02/22-rdf-syntax-ns#}RDF"
345
-
346
- def test_dataservice_rdf_json_ld(self, client):
347
- dataservice = DataserviceFactory()
348
- for fmt in "json", "jsonld":
349
- url = url_for("api.dataservice_rdf_format", dataservice=dataservice, format=fmt)
350
- response = client.get(url, headers={"Accept": "application/ld+json"})
351
- assert200(response)
352
- assert response.content_type == "application/ld+json"
353
- assert response.json["@context"]["@vocab"] == "http://www.w3.org/ns/dcat#"
354
-
355
- @pytest.mark.parametrize(
356
- "fmt,mime",
357
- [
358
- ("n3", "text/n3"),
359
- ("nt", "application/n-triples"),
360
- ("ttl", "application/x-turtle"),
361
- ("xml", "application/rdf+xml"),
362
- ("rdf", "application/rdf+xml"),
363
- ("owl", "application/rdf+xml"),
364
- ("trig", "application/trig"),
365
- ],
366
- )
367
- def test_dataservice_rdf_formats(self, client, fmt, mime):
368
- dataservice = DataserviceFactory()
369
- url = url_for("api.dataservice_rdf_format", dataservice=dataservice, format=fmt)
370
- response = client.get(url, headers={"Accept": mime})
371
- assert200(response)
372
- assert response.content_type == mime
@@ -42,7 +42,7 @@ from udata.i18n import gettext as _
42
42
  from udata.models import CommunityResource, Dataset, Follow, Member, db
43
43
  from udata.tags import MAX_TAG_LENGTH, MIN_TAG_LENGTH
44
44
  from udata.tests.features.territories import create_geozones_fixtures
45
- from udata.tests.helpers import assert200, assert404
45
+ from udata.tests.helpers import assert200, assert204, assert404
46
46
  from udata.utils import faker, unique_string
47
47
 
48
48
  from . import APITestCase
@@ -839,7 +839,7 @@ class DatasetAPITest(APITestCase):
839
839
  dataset.reload()
840
840
  assert dataset.resources[0].schema["url"] == "http://example.com"
841
841
  assert dataset.resources[0].schema["name"] == "etalab/schema-irve-statique"
842
- assert dataset.resources[0].schema["version"] is None
842
+ assert dataset.resources[0].schema["version"] == None
843
843
 
844
844
  resource_data["schema"] = {"name": "etalab/schema-irve-statique"}
845
845
  data["resources"].append(resource_data)
@@ -848,8 +848,8 @@ class DatasetAPITest(APITestCase):
848
848
 
849
849
  dataset.reload()
850
850
  assert dataset.resources[0].schema["name"] == "etalab/schema-irve-statique"
851
- assert dataset.resources[0].schema["url"] is None
852
- assert dataset.resources[0].schema["version"] is None
851
+ assert dataset.resources[0].schema["url"] == None
852
+ assert dataset.resources[0].schema["version"] == None
853
853
 
854
854
  resource_data["schema"] = {"name": "etalab/schema-irve-statique", "version": "2.2.0"}
855
855
  data["resources"].append(resource_data)
@@ -858,7 +858,7 @@ class DatasetAPITest(APITestCase):
858
858
 
859
859
  dataset.reload()
860
860
  assert dataset.resources[0].schema["name"] == "etalab/schema-irve-statique"
861
- assert dataset.resources[0].schema["url"] is None
861
+ assert dataset.resources[0].schema["url"] == None
862
862
  assert dataset.resources[0].schema["version"] == "2.2.0"
863
863
 
864
864
  resource_data["schema"] = {
@@ -870,7 +870,7 @@ class DatasetAPITest(APITestCase):
870
870
 
871
871
  dataset.reload()
872
872
  assert dataset.resources[0].schema["name"] == "etalab/schema-irve-statique"
873
- assert dataset.resources[0].schema["url"] is None
873
+ assert dataset.resources[0].schema["url"] == None
874
874
  assert dataset.resources[0].schema["version"] == "2.2.1"
875
875
 
876
876
  # Putting `None` as the schema argument do not remove the schema
@@ -884,7 +884,7 @@ class DatasetAPITest(APITestCase):
884
884
 
885
885
  dataset.reload()
886
886
  assert dataset.resources[0].schema["name"] == "etalab/schema-irve-statique"
887
- assert dataset.resources[0].schema["url"] is None
887
+ assert dataset.resources[0].schema["url"] == None
888
888
  assert dataset.resources[0].schema["version"] == "2.2.1"
889
889
 
890
890
  # Putting `None` as the schema name and version remove the schema
@@ -897,9 +897,9 @@ class DatasetAPITest(APITestCase):
897
897
  self.assert200(response)
898
898
 
899
899
  dataset.reload()
900
- assert dataset.resources[0].schema["name"] is None
901
- assert dataset.resources[0].schema["url"] is None
902
- assert dataset.resources[0].schema["version"] is None
900
+ assert dataset.resources[0].schema["name"] == None
901
+ assert dataset.resources[0].schema["url"] == None
902
+ assert dataset.resources[0].schema["version"] == None
903
903
 
904
904
 
905
905
  class DatasetBadgeAPITest(APITestCase):
@@ -72,7 +72,7 @@ class OrganizationAPITest:
72
72
  user = api.login()
73
73
  response = api.post(url_for("api.organizations"), data)
74
74
  assert201(response)
75
- assert Organization.objects.count() == 1
75
+ assert Organization.objects.count() is 1
76
76
 
77
77
  org = Organization.objects.first()
78
78
  member = org.member(user)
@@ -89,7 +89,7 @@ class OrganizationAPITest:
89
89
  data["description"] = "new description"
90
90
  response = api.put(url_for("api.organization", org=org), data)
91
91
  assert200(response)
92
- assert Organization.objects.count() == 1
92
+ assert Organization.objects.count() is 1
93
93
  assert Organization.objects.first().description == "new description"
94
94
 
95
95
  def test_organization_api_update_business_number_id(self, api):
@@ -101,7 +101,7 @@ class OrganizationAPITest:
101
101
  data["business_number_id"] = "13002526500013"
102
102
  response = api.put(url_for("api.organization", org=org), data)
103
103
  assert200(response)
104
- assert Organization.objects.count() == 1
104
+ assert Organization.objects.count() is 1
105
105
  assert Organization.objects.first().business_number_id == "13002526500013"
106
106
 
107
107
  def test_organization_api_update_business_number_id_failing(self, api):
@@ -147,7 +147,7 @@ class OrganizationAPITest:
147
147
  api.login()
148
148
  response = api.put(url_for("api.organization", org=org), data)
149
149
  assert403(response)
150
- assert Organization.objects.count() == 1
150
+ assert Organization.objects.count() is 1
151
151
  assert Organization.objects.first().description == org.description
152
152
 
153
153
  def test_organization_api_delete(self, api):
@@ -157,7 +157,7 @@ class OrganizationAPITest:
157
157
  org = OrganizationFactory(members=[member])
158
158
  response = api.delete(url_for("api.organization", org=org))
159
159
  assert204(response)
160
- assert Organization.objects.count() == 1
160
+ assert Organization.objects.count() is 1
161
161
  assert Organization.objects[0].deleted is not None
162
162
 
163
163
  def test_organization_api_delete_deleted(self, api):
@@ -175,7 +175,7 @@ class OrganizationAPITest:
175
175
  org = OrganizationFactory(members=[member])
176
176
  response = api.delete(url_for("api.organization", org=org))
177
177
  assert403(response)
178
- assert Organization.objects.count() == 1
178
+ assert Organization.objects.count() is 1
179
179
  assert Organization.objects[0].deleted is None
180
180
 
181
181
  def test_organization_api_delete_as_non_member_forbidden(self, api):
@@ -184,7 +184,7 @@ class OrganizationAPITest:
184
184
  org = OrganizationFactory()
185
185
  response = api.delete(url_for("api.organization", org=org))
186
186
  assert403(response)
187
- assert Organization.objects.count() == 1
187
+ assert Organization.objects.count() is 1
188
188
  assert Organization.objects[0].deleted is None
189
189
 
190
190
 
@@ -200,10 +200,10 @@ class MembershipAPITest:
200
200
  assert201(response)
201
201
 
202
202
  organization.reload()
203
- assert len(organization.requests) == 1
204
- assert len(organization.pending_requests) == 1
205
- assert len(organization.refused_requests) == 0
206
- assert len(organization.accepted_requests) == 0
203
+ assert len(organization.requests) is 1
204
+ assert len(organization.pending_requests) is 1
205
+ assert len(organization.refused_requests) is 0
206
+ assert len(organization.accepted_requests) is 0
207
207
 
208
208
  request = organization.requests[0]
209
209
  assert request.user == user
@@ -223,10 +223,10 @@ class MembershipAPITest:
223
223
  assert200(response)
224
224
 
225
225
  organization.reload()
226
- assert len(organization.requests) == 1
227
- assert len(organization.pending_requests) == 1
228
- assert len(organization.refused_requests) == 0
229
- assert len(organization.accepted_requests) == 0
226
+ assert len(organization.requests) is 1
227
+ assert len(organization.pending_requests) is 1
228
+ assert len(organization.refused_requests) is 0
229
+ assert len(organization.accepted_requests) is 0
230
230
 
231
231
  request = organization.requests[0]
232
232
  assert request.user == user
@@ -326,10 +326,10 @@ class MembershipAPITest:
326
326
  assert response.json["role"] == "editor"
327
327
 
328
328
  organization.reload()
329
- assert len(organization.requests) == 1
330
- assert len(organization.pending_requests) == 0
331
- assert len(organization.refused_requests) == 0
332
- assert len(organization.accepted_requests) == 1
329
+ assert len(organization.requests) is 1
330
+ assert len(organization.pending_requests) is 0
331
+ assert len(organization.refused_requests) is 0
332
+ assert len(organization.accepted_requests) is 1
333
333
  assert organization.is_member(applicant)
334
334
 
335
335
  request = organization.requests[0]
@@ -380,10 +380,10 @@ class MembershipAPITest:
380
380
  assert200(response)
381
381
 
382
382
  organization.reload()
383
- assert len(organization.requests) == 1
384
- assert len(organization.pending_requests) == 0
385
- assert len(organization.refused_requests) == 1
386
- assert len(organization.accepted_requests) == 0
383
+ assert len(organization.requests) is 1
384
+ assert len(organization.pending_requests) is 0
385
+ assert len(organization.refused_requests) is 1
386
+ assert len(organization.accepted_requests) is 0
387
387
  assert not organization.is_member(applicant)
388
388
 
389
389
  request = organization.requests[0]
@@ -548,12 +548,12 @@ class MembershipAPITest:
548
548
  to_follow.count_followers()
549
549
  assert to_follow.get_metrics()["followers"] == 1
550
550
 
551
- assert Follow.objects.following(to_follow).count() == 0
552
- assert Follow.objects.followers(to_follow).count() == 1
551
+ assert Follow.objects.following(to_follow).count() is 0
552
+ assert Follow.objects.followers(to_follow).count() is 1
553
553
  follow = Follow.objects.followers(to_follow).first()
554
554
  assert isinstance(follow.following, Organization)
555
- assert Follow.objects.following(user).count() == 1
556
- assert Follow.objects.followers(user).count() == 0
555
+ assert Follow.objects.following(user).count() is 1
556
+ assert Follow.objects.followers(user).count() is 0
557
557
 
558
558
  def test_unfollow_org(self, api):
559
559
  """It should unfollow the organization on DELETE"""
@@ -567,12 +567,12 @@ class MembershipAPITest:
567
567
 
568
568
  nb_followers = Follow.objects.followers(to_follow).count()
569
569
 
570
- assert nb_followers == 0
570
+ assert nb_followers is 0
571
571
  assert response.json["followers"] == nb_followers
572
572
 
573
- assert Follow.objects.following(to_follow).count() == 0
574
- assert Follow.objects.following(user).count() == 0
575
- assert Follow.objects.followers(user).count() == 0
573
+ assert Follow.objects.following(to_follow).count() is 0
574
+ assert Follow.objects.following(user).count() is 0
575
+ assert Follow.objects.followers(user).count() is 0
576
576
 
577
577
  def test_suggest_organizations_api(self, api):
578
578
  """It should suggest organizations"""
@@ -658,13 +658,13 @@ class MembershipAPITest:
658
658
 
659
659
  response = api.get(url_for("api.suggest_organizations"), qs={"q": "xxxxxx", "size": "5"})
660
660
  assert200(response)
661
- assert len(response.json) == 0
661
+ assert len(response.json) is 0
662
662
 
663
663
  def test_suggest_organizations_api_empty(self, api):
664
664
  """It should not provide organization suggestion if no data"""
665
665
  response = api.get(url_for("api.suggest_organizations"), qs={"q": "xxxxxx", "size": "5"})
666
666
  assert200(response)
667
- assert len(response.json) == 0
667
+ assert len(response.json) is 0
668
668
 
669
669
  def test_suggest_organizations_homonyms(self, api):
670
670
  """It should suggest organizations and not deduplicate homonyms"""
@@ -673,7 +673,7 @@ class MembershipAPITest:
673
673
  response = api.get(url_for("api.suggest_organizations"), qs={"q": "homonym", "size": "5"})
674
674
  assert200(response)
675
675
 
676
- assert len(response.json) == 2
676
+ assert len(response.json) is 2
677
677
 
678
678
  for suggestion in response.json:
679
679
  assert suggestion["name"] == "homonym"
@@ -749,7 +749,7 @@ class OrganizationDatasetsAPITest:
749
749
  response = api.get(url_for("api.org_datasets", org=org), qs={"page_size": 2})
750
750
 
751
751
  assert200(response)
752
- assert len(response.json["data"]) == 2
752
+ assert len(response.json["data"]) is 2
753
753
 
754
754
 
755
755
  class OrganizationReusesAPITest:
@@ -841,7 +841,7 @@ class OrganizationBadgeAPITest:
841
841
  response = api.post(url, data)
842
842
  assert201(response)
843
843
  self.organization.reload()
844
- assert len(self.organization.badges) == 1
844
+ assert len(self.organization.badges) is 1
845
845
 
846
846
  def test_create_same(self, api):
847
847
  data = self.factory.as_dict()
@@ -852,7 +852,7 @@ class OrganizationBadgeAPITest:
852
852
  response = api.post(url, data)
853
853
  assert200(response)
854
854
  self.organization.reload()
855
- assert len(self.organization.badges) == 1
855
+ assert len(self.organization.badges) is 1
856
856
 
857
857
  def test_create_2nd(self, api):
858
858
  # Explicitely setting the kind to avoid collisions given the
@@ -865,7 +865,7 @@ class OrganizationBadgeAPITest:
865
865
  response = api.post(url, data)
866
866
  assert201(response)
867
867
  self.organization.reload()
868
- assert len(self.organization.badges) == 2
868
+ assert len(self.organization.badges) is 2
869
869
 
870
870
  def test_delete(self, api):
871
871
  badge = self.factory()
@@ -876,7 +876,7 @@ class OrganizationBadgeAPITest:
876
876
  response = api.delete(url)
877
877
  assert204(response)
878
878
  self.organization.reload()
879
- assert len(self.organization.badges) == 0
879
+ assert len(self.organization.badges) is 0
880
880
 
881
881
  def test_delete_404(self, api):
882
882
  kind = str(self.factory().kind)
@@ -36,27 +36,6 @@ class ReuseAPITest:
36
36
  assert200(response)
37
37
  assert len(response.json["data"]) == len(reuses)
38
38
 
39
- def test_reuse_api_list_with_sorts(self, api):
40
- ReuseFactory(title="A", created_at="2024-03-01")
41
- ReuseFactory(title="B", metrics={"views": 42}, created_at="2024-02-01")
42
- ReuseFactory(title="C", metrics={"views": 1337}, created_at="2024-05-01")
43
- ReuseFactory(title="D", created_at="2024-04-01")
44
-
45
- response = api.get(url_for("api.reuses", sort="views"))
46
- assert200(response)
47
-
48
- assert [reuse["title"] for reuse in response.json["data"]] == ["A", "D", "B", "C"]
49
-
50
- response = api.get(url_for("api.reuses", sort="-views"))
51
- assert200(response)
52
-
53
- assert [reuse["title"] for reuse in response.json["data"]] == ["C", "B", "D", "A"]
54
-
55
- response = api.get(url_for("api.reuses", sort="created"))
56
- assert200(response)
57
-
58
- assert [reuse["title"] for reuse in response.json["data"]] == ["B", "A", "D", "C"]
59
-
60
39
  def test_reuse_api_list_with_filters(self, api):
61
40
  """Should filters reuses results based on query filters"""
62
41
  owner = UserFactory()
@@ -183,34 +162,6 @@ class ReuseAPITest:
183
162
  assert Reuse.objects.count() == 1
184
163
  assert Reuse.objects.first().description == "new description"
185
164
 
186
- def test_reuse_api_remove_org(self, api):
187
- user = api.login()
188
- reuse = ReuseFactory(owner=user)
189
- data = reuse.to_dict()
190
- data["organization"] = None
191
- response = api.put(url_for("api.reuse", reuse=reuse), data)
192
- assert200(response)
193
- assert Reuse.objects.count() == 1
194
- assert Reuse.objects.first().organization is None
195
-
196
- def test_reuse_api_update_org_with_full_object(self, api):
197
- """We can send the full org object (not only the ID) to update to an org"""
198
- user = api.login()
199
- reuse = ReuseFactory(owner=user)
200
- member = Member(user=user, role="admin")
201
- org = OrganizationFactory(members=[member])
202
-
203
- data = reuse.to_dict()
204
- data["owner"] = None
205
- data["organization"] = org.to_dict()
206
-
207
- response = api.put(url_for("api.reuse", reuse=reuse), data)
208
- assert200(response)
209
-
210
- assert Reuse.objects.count() == 1
211
- assert Reuse.objects.first().owner is None
212
- assert Reuse.objects.first().organization.id == org.id
213
-
214
165
  def test_reuse_api_update_deleted(self, api):
215
166
  """It should not update a deleted reuse from the API and raise 410"""
216
167
  api.login()
@@ -13,7 +13,7 @@ class TagsAPITest:
13
13
  def test_suggest_tags_api(self, api):
14
14
  """It should suggest tags"""
15
15
  for i in range(3):
16
- tags = [faker.tag(), faker.tag(), "test", "test-{0}".format(i)]
16
+ tags = [faker.word(), faker.word(), "test", "test-{0}".format(i)]
17
17
  ReuseFactory(tags=tags, visible=True)
18
18
  DatasetFactory(tags=tags, visible=True)
19
19
 
@@ -33,7 +33,7 @@ class TagsAPITest:
33
33
  def test_suggest_tags_api_with_unicode(self, api):
34
34
  """It should suggest tags"""
35
35
  for i in range(3):
36
- tags = [faker.tag(), faker.tag(), "testé", "testé-{0}".format(i)]
36
+ tags = [faker.word(), faker.word(), "testé", "testé-{0}".format(i)]
37
37
  ReuseFactory(tags=tags, visible=True)
38
38
  DatasetFactory(tags=tags, visible=True)
39
39
 
@@ -61,10 +61,10 @@ class TagsAPITest:
61
61
 
62
62
  response = api.get(url_for("api.suggest_tags"), qs={"q": "bbbb", "size": "5"})
63
63
  assert200(response)
64
- assert len(response.json) == 0
64
+ assert len(response.json) is 0
65
65
 
66
66
  def test_suggest_tags_api_empty(self, api):
67
67
  """It should not provide tag suggestion if no data"""
68
68
  response = api.get(url_for("api.suggest_tags"), qs={"q": "bbbb", "size": "5"})
69
69
  assert200(response)
70
- assert len(response.json) == 0
70
+ assert len(response.json) is 0
@@ -58,7 +58,7 @@ class TransferAPITest(APITestCase):
58
58
  self.assertEqual(data["status"], "pending")
59
59
 
60
60
  def test_400_on_bad_subject(self):
61
- self.login()
61
+ user = self.login()
62
62
  recipient = UserFactory()
63
63
  comment = faker.sentence()
64
64
 
@@ -141,17 +141,6 @@ class UserAPITest(APITestCase):
141
141
  self.assertEqual(suggestion["first_name"], "test")
142
142
  self.assertEqual(suggestion["last_name"], "homonym")
143
143
 
144
- def test_suggest_users_api_size_validation(self):
145
- """It should validate that the size parameter is between 1 and 20."""
146
- response = self.get(url_for("api.suggest_users"), qs={"q": "foobar", "size": "0"})
147
- self.assert400(response)
148
- self.assertIn("between 1 and 20", response.json["errors"]["size"])
149
-
150
- response = self.get(url_for("api.suggest_users"), qs={"q": "foobar", "size": "21"})
151
-
152
- self.assert400(response)
153
- self.assertIn("between 1 and 20", response.json["errors"]["size"])
154
-
155
144
  def test_user_api_full_text_search_first_name(self):
156
145
  """It should find users based on first name"""
157
146
  self.login(AdminFactory())