udata 9.2.5.dev32160__py2.py3-none-any.whl → 9.2.5.dev32190__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.
- udata/api_fields.py +143 -37
- udata/core/badges/factories.py +3 -5
- udata/core/badges/forms.py +0 -3
- udata/core/badges/models.py +19 -24
- udata/core/badges/tests/test_commands.py +3 -4
- udata/core/badges/tests/test_model.py +37 -28
- udata/core/dataservices/models.py +4 -1
- udata/core/dataset/api.py +10 -0
- udata/core/dataset/events.py +25 -16
- udata/core/dataset/models.py +16 -6
- udata/core/dataset/search.py +3 -1
- udata/core/organization/api.py +11 -0
- udata/core/organization/models.py +23 -10
- udata/core/organization/search.py +6 -2
- udata/core/reuse/api.py +10 -0
- udata/core/reuse/models.py +15 -5
- udata/core/reuse/search.py +3 -1
- udata/search/fields.py +8 -3
- udata/static/chunks/{10.a99bb538cfbadb38dbcb.js → 10.dac55d18d0b4ef3cdacf.js} +3 -3
- udata/static/chunks/{10.a99bb538cfbadb38dbcb.js.map → 10.dac55d18d0b4ef3cdacf.js.map} +1 -1
- udata/static/chunks/{11.bb1c1fb39f740fbbeec0.js → 11.4a20a75f827c5a1125c3.js} +3 -3
- udata/static/chunks/{11.bb1c1fb39f740fbbeec0.js.map → 11.4a20a75f827c5a1125c3.js.map} +1 -1
- udata/static/chunks/{13.bef5fdb3e147e94fea99.js → 13.645dd0b7c0b9210f1b56.js} +2 -2
- udata/static/chunks/{13.bef5fdb3e147e94fea99.js.map → 13.645dd0b7c0b9210f1b56.js.map} +1 -1
- udata/static/chunks/{17.b91d28f550dc44bc4979.js → 17.8e19985c4d12a3b7b0c0.js} +2 -2
- udata/static/chunks/{17.b91d28f550dc44bc4979.js.map → 17.8e19985c4d12a3b7b0c0.js.map} +1 -1
- udata/static/chunks/{19.2c615ffee1e807000770.js → 19.825a43c330157e351fca.js} +3 -3
- udata/static/chunks/{19.2c615ffee1e807000770.js.map → 19.825a43c330157e351fca.js.map} +1 -1
- udata/static/chunks/{8.291bde987ed97294e4de.js → 8.5ee0cf635c848abbfc05.js} +2 -2
- udata/static/chunks/{8.291bde987ed97294e4de.js.map → 8.5ee0cf635c848abbfc05.js.map} +1 -1
- udata/static/chunks/{9.985935421e62c97a9f86.js → 9.df3c36f8d0d210621fbb.js} +3 -3
- udata/static/chunks/{9.985935421e62c97a9f86.js.map → 9.df3c36f8d0d210621fbb.js.map} +1 -1
- udata/static/common.js +1 -1
- udata/static/common.js.map +1 -1
- udata/tests/api/test_dataservices_api.py +21 -1
- udata/tests/api/test_datasets_api.py +15 -0
- udata/tests/api/test_organizations_api.py +15 -4
- udata/tests/api/test_reuses_api.py +15 -0
- udata/tests/apiv2/test_datasets.py +17 -0
- udata/tests/dataset/test_dataset_events.py +3 -15
- udata/tests/organization/test_organization_model.py +21 -0
- udata/tests/site/test_site_metrics.py +1 -3
- {udata-9.2.5.dev32160.dist-info → udata-9.2.5.dev32190.dist-info}/METADATA +3 -1
- {udata-9.2.5.dev32160.dist-info → udata-9.2.5.dev32190.dist-info}/RECORD +48 -48
- {udata-9.2.5.dev32160.dist-info → udata-9.2.5.dev32190.dist-info}/LICENSE +0 -0
- {udata-9.2.5.dev32160.dist-info → udata-9.2.5.dev32190.dist-info}/WHEEL +0 -0
- {udata-9.2.5.dev32160.dist-info → udata-9.2.5.dev32190.dist-info}/entry_points.txt +0 -0
- {udata-9.2.5.dev32160.dist-info → udata-9.2.5.dev32190.dist-info}/top_level.txt +0 -0
udata/static/common.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e){function __webpack_require__(c){if(a[c])return a[c].exports;var f=a[c]={exports:{},id:c,loaded:!1};return e[c].call(f.exports,f,f.exports,__webpack_require__),f.loaded=!0,f.exports}var c=window.webpackJsonp;window.webpackJsonp=function(r,
|
|
1
|
+
!function(e){function __webpack_require__(c){if(a[c])return a[c].exports;var f=a[c]={exports:{},id:c,loaded:!1};return e[c].call(f.exports,f,f.exports,__webpack_require__),f.loaded=!0,f.exports}var c=window.webpackJsonp;window.webpackJsonp=function(r,t){for(var b,d,_=0,n=[];_<r.length;_++)d=r[_],f[d]&&n.push.apply(n,f[d]),f[d]=0;for(b in t){var i=t[b];switch(typeof i){case"object":e[b]=function(c){var a=c.slice(1),f=c[0];return function(c,r,t){e[f].apply(this,[c,r,t].concat(a))}}(i);break;case"function":e[b]=i;break;default:e[b]=e[i]}}for(c&&c(r,t);n.length;)n.shift().call(null,__webpack_require__);if(t[0])return a[0]=0,__webpack_require__(0)};var a={},f={31:0};__webpack_require__.e=function(e,c){if(0===f[e])return c.call(null,__webpack_require__);if(void 0!==f[e])f[e].push(c);else{f[e]=[c];var a=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:"f575c19b056e559584d4",1:"c78e30240d3784c22a76",2:"c67aa76cc078c193aed5",3:"174a03e48d267820919b",4:"bfba880427270ef61dfd",5:"448ccace1bf3389d9b38",6:"037369868acc94a7533f",7:"5237c02df1fdd7c2449a",8:"5ee0cf635c848abbfc05",9:"df3c36f8d0d210621fbb",10:"dac55d18d0b4ef3cdacf",11:"4a20a75f827c5a1125c3",12:"50d20132d60ff7279de9",13:"645dd0b7c0b9210f1b56",14:"8b85221f000b80696e52",15:"10e44b70e118e7ebc13a",16:"a43cef89812c95f1b02e",17:"8e19985c4d12a3b7b0c0",18:"3b5ad23785c7be62ee30",19:"825a43c330157e351fca",20:"727bc4349ebdc499fff7",21:"3a20f161cfa3ff59cb67",22:"4289d31d931fb184a394",23:"32fd0887bdcc0b87a7c5",24:"a8d73082a87feb753036",25:"334bb014e5afb23064f1",26:"0f8affafd27dcc123fc0",27:"10a6d497f15faa1ddeee",28:"06100ef3e7e642814327",29:"4d752ece5790785c5889",30:"e97e10c9246818e2b4b2",32:"55f052535c5ecc898d67",33:"98be721e901eda7ed45c"}[e]+".js",a.appendChild(r)}},__webpack_require__.m=e,__webpack_require__.c=a,__webpack_require__.p="/static/"}(function(e){for(var c in e)if(Object.prototype.hasOwnProperty.call(e,c))switch(typeof e[c]){case"function":break;case"object":e[c]=function(c){var a=c.slice(1),f=e[c[0]];return function(e,c,r){f.apply(this,[e,c,r].concat(a))}}(e[c]);break;default:e[c]=e[e[c]]}return e}([]));
|
|
2
2
|
//# sourceMappingURL=common.js.map
|
udata/static/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///common.js","webpack:///webpack/bootstrap 49bda6274ab744bf8d65"],"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\":\"f575c19b056e559584d4\",\"1\":\"c78e30240d3784c22a76\",\"2\":\"c67aa76cc078c193aed5\",\"3\":\"174a03e48d267820919b\",\"4\":\"bfba880427270ef61dfd\",\"5\":\"448ccace1bf3389d9b38\",\"6\":\"037369868acc94a7533f\",\"7\":\"5237c02df1fdd7c2449a\",\"8\":\"291bde987ed97294e4de\",\"9\":\"985935421e62c97a9f86\",\"10\":\"a99bb538cfbadb38dbcb\",\"11\":\"bb1c1fb39f740fbbeec0\",\"12\":\"50d20132d60ff7279de9\",\"13\":\"bef5fdb3e147e94fea99\",\"14\":\"8b85221f000b80696e52\",\"15\":\"10e44b70e118e7ebc13a\",\"16\":\"a43cef89812c95f1b02e\",\"17\":\"b91d28f550dc44bc4979\",\"18\":\"3b5ad23785c7be62ee30\",\"19\":\"2c615ffee1e807000770\",\"20\":\"727bc4349ebdc499fff7\",\"21\":\"3a20f161cfa3ff59cb67\",\"22\":\"4289d31d931fb184a394\",\"23\":\"32fd0887bdcc0b87a7c5\",\"24\":\"a8d73082a87feb753036\",\"25\":\"334bb014e5afb23064f1\",\"26\":\"0f8affafd27dcc123fc0\",\"27\":\"10a6d497f15faa1ddeee\",\"28\":\"06100ef3e7e642814327\",\"29\":\"4d752ece5790785c5889\",\"30\":\"e97e10c9246818e2b4b2\",\"32\":\"55f052535c5ecc898d67\",\"33\":\"98be721e901eda7ed45c\"}[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\":\"f575c19b056e559584d4\",\"1\":\"c78e30240d3784c22a76\",\"2\":\"c67aa76cc078c193aed5\",\"3\":\"174a03e48d267820919b\",\"4\":\"bfba880427270ef61dfd\",\"5\":\"448ccace1bf3389d9b38\",\"6\":\"037369868acc94a7533f\",\"7\":\"5237c02df1fdd7c2449a\",\"8\":\"291bde987ed97294e4de\",\"9\":\"985935421e62c97a9f86\",\"10\":\"a99bb538cfbadb38dbcb\",\"11\":\"bb1c1fb39f740fbbeec0\",\"12\":\"50d20132d60ff7279de9\",\"13\":\"bef5fdb3e147e94fea99\",\"14\":\"8b85221f000b80696e52\",\"15\":\"10e44b70e118e7ebc13a\",\"16\":\"a43cef89812c95f1b02e\",\"17\":\"b91d28f550dc44bc4979\",\"18\":\"3b5ad23785c7be62ee30\",\"19\":\"2c615ffee1e807000770\",\"20\":\"727bc4349ebdc499fff7\",\"21\":\"3a20f161cfa3ff59cb67\",\"22\":\"4289d31d931fb184a394\",\"23\":\"32fd0887bdcc0b87a7c5\",\"24\":\"a8d73082a87feb753036\",\"25\":\"334bb014e5afb23064f1\",\"26\":\"0f8affafd27dcc123fc0\",\"27\":\"10a6d497f15faa1ddeee\",\"28\":\"06100ef3e7e642814327\",\"29\":\"4d752ece5790785c5889\",\"30\":\"e97e10c9246818e2b4b2\",\"32\":\"55f052535c5ecc898d67\",\"33\":\"98be721e901eda7ed45c\"}[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 49bda6274ab744bf8d65\n **/"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///common.js","webpack:///webpack/bootstrap e8f17647963f318d0de5"],"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\":\"f575c19b056e559584d4\",\"1\":\"c78e30240d3784c22a76\",\"2\":\"c67aa76cc078c193aed5\",\"3\":\"174a03e48d267820919b\",\"4\":\"bfba880427270ef61dfd\",\"5\":\"448ccace1bf3389d9b38\",\"6\":\"037369868acc94a7533f\",\"7\":\"5237c02df1fdd7c2449a\",\"8\":\"5ee0cf635c848abbfc05\",\"9\":\"df3c36f8d0d210621fbb\",\"10\":\"dac55d18d0b4ef3cdacf\",\"11\":\"4a20a75f827c5a1125c3\",\"12\":\"50d20132d60ff7279de9\",\"13\":\"645dd0b7c0b9210f1b56\",\"14\":\"8b85221f000b80696e52\",\"15\":\"10e44b70e118e7ebc13a\",\"16\":\"a43cef89812c95f1b02e\",\"17\":\"8e19985c4d12a3b7b0c0\",\"18\":\"3b5ad23785c7be62ee30\",\"19\":\"825a43c330157e351fca\",\"20\":\"727bc4349ebdc499fff7\",\"21\":\"3a20f161cfa3ff59cb67\",\"22\":\"4289d31d931fb184a394\",\"23\":\"32fd0887bdcc0b87a7c5\",\"24\":\"a8d73082a87feb753036\",\"25\":\"334bb014e5afb23064f1\",\"26\":\"0f8affafd27dcc123fc0\",\"27\":\"10a6d497f15faa1ddeee\",\"28\":\"06100ef3e7e642814327\",\"29\":\"4d752ece5790785c5889\",\"30\":\"e97e10c9246818e2b4b2\",\"32\":\"55f052535c5ecc898d67\",\"33\":\"98be721e901eda7ed45c\"}[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\":\"f575c19b056e559584d4\",\"1\":\"c78e30240d3784c22a76\",\"2\":\"c67aa76cc078c193aed5\",\"3\":\"174a03e48d267820919b\",\"4\":\"bfba880427270ef61dfd\",\"5\":\"448ccace1bf3389d9b38\",\"6\":\"037369868acc94a7533f\",\"7\":\"5237c02df1fdd7c2449a\",\"8\":\"5ee0cf635c848abbfc05\",\"9\":\"df3c36f8d0d210621fbb\",\"10\":\"dac55d18d0b4ef3cdacf\",\"11\":\"4a20a75f827c5a1125c3\",\"12\":\"50d20132d60ff7279de9\",\"13\":\"645dd0b7c0b9210f1b56\",\"14\":\"8b85221f000b80696e52\",\"15\":\"10e44b70e118e7ebc13a\",\"16\":\"a43cef89812c95f1b02e\",\"17\":\"8e19985c4d12a3b7b0c0\",\"18\":\"3b5ad23785c7be62ee30\",\"19\":\"825a43c330157e351fca\",\"20\":\"727bc4349ebdc499fff7\",\"21\":\"3a20f161cfa3ff59cb67\",\"22\":\"4289d31d931fb184a394\",\"23\":\"32fd0887bdcc0b87a7c5\",\"24\":\"a8d73082a87feb753036\",\"25\":\"334bb014e5afb23064f1\",\"26\":\"0f8affafd27dcc123fc0\",\"27\":\"10a6d497f15faa1ddeee\",\"28\":\"06100ef3e7e642814327\",\"29\":\"4d752ece5790785c5889\",\"30\":\"e97e10c9246818e2b4b2\",\"32\":\"55f052535c5ecc898d67\",\"33\":\"98be721e901eda7ed45c\"}[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 e8f17647963f318d0de5\n **/"],"sourceRoot":""}
|
|
@@ -3,6 +3,7 @@ from xml.etree.ElementTree import XML
|
|
|
3
3
|
import pytest
|
|
4
4
|
from flask import url_for
|
|
5
5
|
|
|
6
|
+
import udata.core.organization.constants as org_constants
|
|
6
7
|
from udata.core.dataservices.factories import DataserviceFactory
|
|
7
8
|
from udata.core.dataservices.models import Dataservice
|
|
8
9
|
from udata.core.dataset.factories import DatasetFactory, LicenseFactory
|
|
@@ -10,7 +11,7 @@ from udata.core.organization.factories import OrganizationFactory
|
|
|
10
11
|
from udata.core.organization.models import Member
|
|
11
12
|
from udata.core.user.factories import UserFactory
|
|
12
13
|
from udata.i18n import gettext as _
|
|
13
|
-
from udata.tests.helpers import assert200, assert_redirects
|
|
14
|
+
from udata.tests.helpers import assert200, assert400, assert_redirects
|
|
14
15
|
|
|
15
16
|
from . import APITestCase
|
|
16
17
|
|
|
@@ -18,6 +19,25 @@ from . import APITestCase
|
|
|
18
19
|
class DataserviceAPITest(APITestCase):
|
|
19
20
|
modules = []
|
|
20
21
|
|
|
22
|
+
def test_dataservices_api_list_with_filters(self):
|
|
23
|
+
"""Should filters dataservices results based on query filters"""
|
|
24
|
+
org = OrganizationFactory()
|
|
25
|
+
org_public_service = OrganizationFactory()
|
|
26
|
+
org_public_service.add_badge(org_constants.PUBLIC_SERVICE)
|
|
27
|
+
|
|
28
|
+
_dataservice = DataserviceFactory(organization=org)
|
|
29
|
+
dataservice_public_service = DataserviceFactory(organization=org_public_service)
|
|
30
|
+
|
|
31
|
+
response = self.get(
|
|
32
|
+
url_for("api.dataservices", organization_badge=org_constants.PUBLIC_SERVICE)
|
|
33
|
+
)
|
|
34
|
+
assert200(response)
|
|
35
|
+
assert len(response.json["data"]) == 1
|
|
36
|
+
assert response.json["data"][0]["id"] == str(dataservice_public_service.id)
|
|
37
|
+
|
|
38
|
+
response = self.get(url_for("api.dataservices", organization_badge="bad-badge"))
|
|
39
|
+
assert400(response)
|
|
40
|
+
|
|
21
41
|
def test_dataservice_api_create(self):
|
|
22
42
|
user = self.login()
|
|
23
43
|
datasets = DatasetFactory.create_batch(3)
|
|
@@ -8,6 +8,7 @@ import pytz
|
|
|
8
8
|
import requests_mock
|
|
9
9
|
from flask import url_for
|
|
10
10
|
|
|
11
|
+
import udata.core.organization.constants as org_constants
|
|
11
12
|
from udata.api import fields
|
|
12
13
|
from udata.app import cache
|
|
13
14
|
from udata.core import storages
|
|
@@ -148,6 +149,8 @@ class DatasetAPITest(APITestCase):
|
|
|
148
149
|
"""Should filters datasets results based on query filters"""
|
|
149
150
|
owner = UserFactory()
|
|
150
151
|
org = OrganizationFactory()
|
|
152
|
+
org_public_service = OrganizationFactory()
|
|
153
|
+
org_public_service.add_badge(org_constants.PUBLIC_SERVICE)
|
|
151
154
|
|
|
152
155
|
[DatasetFactory() for i in range(2)]
|
|
153
156
|
|
|
@@ -167,6 +170,7 @@ class DatasetAPITest(APITestCase):
|
|
|
167
170
|
|
|
168
171
|
owner_dataset = DatasetFactory(owner=owner)
|
|
169
172
|
org_dataset = DatasetFactory(organization=org)
|
|
173
|
+
org_dataset_public_service = DatasetFactory(organization=org_public_service)
|
|
170
174
|
|
|
171
175
|
schema_dataset = DatasetFactory(
|
|
172
176
|
resources=[
|
|
@@ -247,6 +251,17 @@ class DatasetAPITest(APITestCase):
|
|
|
247
251
|
response = self.get(url_for("api.datasets", organization="org-id"))
|
|
248
252
|
self.assert400(response)
|
|
249
253
|
|
|
254
|
+
# filter on organization badge
|
|
255
|
+
response = self.get(
|
|
256
|
+
url_for("api.datasets", organization_badge=org_constants.PUBLIC_SERVICE)
|
|
257
|
+
)
|
|
258
|
+
self.assert200(response)
|
|
259
|
+
self.assertEqual(len(response.json["data"]), 1)
|
|
260
|
+
self.assertEqual(response.json["data"][0]["id"], str(org_dataset_public_service.id))
|
|
261
|
+
|
|
262
|
+
response = self.get(url_for("api.datasets", organization_badge="bad-badge"))
|
|
263
|
+
self.assert400(response)
|
|
264
|
+
|
|
250
265
|
# filter on schema
|
|
251
266
|
response = self.get(url_for("api.datasets", schema="my-schema"))
|
|
252
267
|
self.assert200(response)
|
|
@@ -3,6 +3,7 @@ from datetime import datetime
|
|
|
3
3
|
import pytest
|
|
4
4
|
from flask import url_for
|
|
5
5
|
|
|
6
|
+
import udata.core.organization.constants as org_constants
|
|
6
7
|
from udata.core.badges.factories import badge_factory
|
|
7
8
|
from udata.core.badges.signals import on_badge_added, on_badge_removed
|
|
8
9
|
from udata.core.dataset.factories import DatasetFactory
|
|
@@ -41,6 +42,20 @@ class OrganizationAPITest:
|
|
|
41
42
|
assert200(response)
|
|
42
43
|
len(response.json["data"]) == len(organizations)
|
|
43
44
|
|
|
45
|
+
def test_organization_api_list_with_filters(self, api):
|
|
46
|
+
"""It should filter the organization list"""
|
|
47
|
+
_org = OrganizationFactory()
|
|
48
|
+
org_public_service = OrganizationFactory()
|
|
49
|
+
org_public_service.add_badge(org_constants.PUBLIC_SERVICE)
|
|
50
|
+
|
|
51
|
+
response = api.get(url_for("api.organizations", badge=org_constants.PUBLIC_SERVICE))
|
|
52
|
+
assert200(response)
|
|
53
|
+
assert len(response.json["data"]) == 1
|
|
54
|
+
assert response.json["data"][0]["id"] == str(org_public_service.id)
|
|
55
|
+
|
|
56
|
+
response = api.get(url_for("api.organizations", badge="bad-badge"))
|
|
57
|
+
assert400(response)
|
|
58
|
+
|
|
44
59
|
def test_organization_role_api_get(self, api):
|
|
45
60
|
"""It should fetch an organization's roles list from the API"""
|
|
46
61
|
response = api.get(url_for("api.org_roles"))
|
|
@@ -818,10 +833,6 @@ class OrganizationBadgeAPITest:
|
|
|
818
833
|
|
|
819
834
|
@pytest.fixture(autouse=True)
|
|
820
835
|
def setUp(self, api, clean_db):
|
|
821
|
-
# Register at least two badges
|
|
822
|
-
Organization.__badges__["test-1"] = "Test 1"
|
|
823
|
-
Organization.__badges__["test-2"] = "Test 2"
|
|
824
|
-
|
|
825
836
|
self.factory = badge_factory(Organization)
|
|
826
837
|
self.user = api.login(AdminFactory())
|
|
827
838
|
self.organization = OrganizationFactory()
|
|
@@ -4,6 +4,7 @@ import pytest
|
|
|
4
4
|
from flask import url_for
|
|
5
5
|
from werkzeug.test import TestResponse
|
|
6
6
|
|
|
7
|
+
import udata.core.organization.constants as org_constants
|
|
7
8
|
from udata.core.badges.factories import badge_factory
|
|
8
9
|
from udata.core.dataset.factories import DatasetFactory
|
|
9
10
|
from udata.core.organization.factories import OrganizationFactory
|
|
@@ -67,12 +68,17 @@ class ReuseAPITest:
|
|
|
67
68
|
"""Should filters reuses results based on query filters"""
|
|
68
69
|
owner = UserFactory()
|
|
69
70
|
org = OrganizationFactory()
|
|
71
|
+
org_public_service = OrganizationFactory()
|
|
72
|
+
org_public_service.add_badge(org_constants.PUBLIC_SERVICE)
|
|
70
73
|
|
|
71
74
|
[ReuseFactory(topic="health", type="api") for i in range(2)]
|
|
72
75
|
|
|
73
76
|
tag_reuse = ReuseFactory(tags=["my-tag", "other"], topic="health", type="api")
|
|
74
77
|
owner_reuse = ReuseFactory(owner=owner, topic="health", type="api")
|
|
75
78
|
org_reuse = ReuseFactory(organization=org, topic="health", type="api")
|
|
79
|
+
org_reuse_public_service = ReuseFactory(
|
|
80
|
+
organization=org_public_service, topic="health", type="api"
|
|
81
|
+
)
|
|
76
82
|
featured_reuse = ReuseFactory(featured=True, topic="health", type="api")
|
|
77
83
|
topic_reuse = ReuseFactory(topic="transport_and_mobility", type="api")
|
|
78
84
|
type_reuse = ReuseFactory(topic="health", type="application")
|
|
@@ -125,6 +131,15 @@ class ReuseAPITest:
|
|
|
125
131
|
response = api.get(url_for("api.reuses", organization="org-id"))
|
|
126
132
|
assert400(response)
|
|
127
133
|
|
|
134
|
+
# filter on organization badge
|
|
135
|
+
response = api.get(url_for("api.reuses", organization_badge=org_constants.PUBLIC_SERVICE))
|
|
136
|
+
assert200(response)
|
|
137
|
+
assert len(response.json["data"]) == 1
|
|
138
|
+
assert response.json["data"][0]["id"] == str(org_reuse_public_service.id)
|
|
139
|
+
|
|
140
|
+
response = api.get(url_for("api.reuses", organization_badge="bad-badge"))
|
|
141
|
+
assert400(response)
|
|
142
|
+
|
|
128
143
|
def test_reuse_api_list_filter_private(self, api) -> None:
|
|
129
144
|
"""Should filters reuses results based on the `private` filter"""
|
|
130
145
|
user = UserFactory()
|
|
@@ -2,6 +2,7 @@ from datetime import datetime
|
|
|
2
2
|
|
|
3
3
|
from flask import url_for
|
|
4
4
|
|
|
5
|
+
import udata.core.organization.constants as org_constants
|
|
5
6
|
from udata.core.dataset.apiv2 import DEFAULT_PAGE_SIZE
|
|
6
7
|
from udata.core.dataset.factories import (
|
|
7
8
|
CommunityResourceFactory,
|
|
@@ -44,6 +45,22 @@ class DatasetAPIV2Test(APITestCase):
|
|
|
44
45
|
assert data["community_resources"]["type"] == "GET"
|
|
45
46
|
assert data["community_resources"]["total"] == 0
|
|
46
47
|
|
|
48
|
+
def test_search_dataset(self):
|
|
49
|
+
org = OrganizationFactory()
|
|
50
|
+
org.add_badge(org_constants.CERTIFIED)
|
|
51
|
+
org_public_service = OrganizationFactory()
|
|
52
|
+
org_public_service.add_badge(org_constants.PUBLIC_SERVICE)
|
|
53
|
+
_dataset_org = DatasetFactory(organization=org)
|
|
54
|
+
dataset_org_public_service = DatasetFactory(organization=org_public_service)
|
|
55
|
+
|
|
56
|
+
response = self.get(
|
|
57
|
+
url_for("apiv2.dataset_search", organization_badge=org_constants.PUBLIC_SERVICE)
|
|
58
|
+
)
|
|
59
|
+
self.assert200(response)
|
|
60
|
+
data = response.json["data"]
|
|
61
|
+
assert len(data) == 1
|
|
62
|
+
assert data[0]["id"] == str(dataset_org_public_service.id)
|
|
63
|
+
|
|
47
64
|
|
|
48
65
|
class DatasetResourceAPIV2Test(APITestCase):
|
|
49
66
|
def test_get_specific(self):
|
|
@@ -2,7 +2,6 @@ from unittest.mock import patch
|
|
|
2
2
|
|
|
3
3
|
import pytest
|
|
4
4
|
from flask import current_app
|
|
5
|
-
from requests.compat import json as complexjson
|
|
6
5
|
|
|
7
6
|
from udata.core.dataset.events import serialize_resource_for_event
|
|
8
7
|
from udata.core.dataset.factories import DatasetFactory, ResourceFactory
|
|
@@ -77,16 +76,11 @@ class DatasetEventsTest:
|
|
|
77
76
|
dataset.update_resource(resource)
|
|
78
77
|
|
|
79
78
|
mock_req.assert_called_with(
|
|
80
|
-
f"{current_app.config['RESOURCES_ANALYSER_URI']}/api/resources/",
|
|
79
|
+
f"{current_app.config['RESOURCES_ANALYSER_URI']}/api/resources/{resource.id}",
|
|
81
80
|
json=expected_value,
|
|
82
81
|
headers={"Authorization": "Bearer foobar-api-key"},
|
|
83
82
|
)
|
|
84
83
|
|
|
85
|
-
# Mocking requests call doesn't call the JSON encoder
|
|
86
|
-
# so calling it manually here to prevent encoding errors.
|
|
87
|
-
# (for example, encoding Embeds fails)
|
|
88
|
-
complexjson.dumps(expected_value)
|
|
89
|
-
|
|
90
84
|
@patch("requests.delete")
|
|
91
85
|
@pytest.mark.options(RESOURCES_ANALYSER_API_KEY="foobar-api-key")
|
|
92
86
|
def test_publish_message_resource_removed(self, mock_req):
|
|
@@ -94,17 +88,11 @@ class DatasetEventsTest:
|
|
|
94
88
|
dataset = DatasetFactory(resources=[resource])
|
|
95
89
|
expected_signals = (Dataset.on_resource_removed,)
|
|
96
90
|
|
|
97
|
-
expected_value = {
|
|
98
|
-
"resource_id": str(resource.id),
|
|
99
|
-
"dataset_id": str(dataset.id),
|
|
100
|
-
"document": None,
|
|
101
|
-
}
|
|
102
|
-
|
|
103
91
|
with assert_emit(*expected_signals):
|
|
104
92
|
dataset.remove_resource(resource)
|
|
105
93
|
|
|
106
94
|
mock_req.assert_called_with(
|
|
107
|
-
f"{current_app.config['RESOURCES_ANALYSER_URI']}/api/resources/",
|
|
108
|
-
json=
|
|
95
|
+
f"{current_app.config['RESOURCES_ANALYSER_URI']}/api/resources/{resource.id}",
|
|
96
|
+
json=None,
|
|
109
97
|
headers={"Authorization": "Bearer foobar-api-key"},
|
|
110
98
|
)
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
|
|
3
|
+
import udata.core.organization.constants as org_constants
|
|
3
4
|
from udata.core.dataset.factories import DatasetFactory, HiddenDatasetFactory
|
|
4
5
|
from udata.core.followers.signals import on_follow, on_unfollow
|
|
5
6
|
from udata.core.organization.factories import OrganizationFactory
|
|
7
|
+
from udata.core.organization.models import Organization
|
|
6
8
|
from udata.core.reuse.factories import ReuseFactory, VisibleReuseFactory
|
|
7
9
|
from udata.core.user.factories import UserFactory
|
|
8
10
|
from udata.models import Dataset, Follow, Member, Reuse
|
|
@@ -50,3 +52,22 @@ class OrganizationModelTest(TestCase, DBTestMixin):
|
|
|
50
52
|
assert org.get_metrics()["datasets"] == 0
|
|
51
53
|
assert org.get_metrics()["reuses"] == 0
|
|
52
54
|
assert org.get_metrics()["followers"] == 0
|
|
55
|
+
|
|
56
|
+
def test_organization_queryset_with_badge(self):
|
|
57
|
+
org_public_service = OrganizationFactory()
|
|
58
|
+
org_public_service.add_badge(org_constants.PUBLIC_SERVICE)
|
|
59
|
+
org_certified_association = OrganizationFactory()
|
|
60
|
+
org_certified_association.add_badge(org_constants.CERTIFIED)
|
|
61
|
+
org_certified_association.add_badge(org_constants.ASSOCIATION)
|
|
62
|
+
|
|
63
|
+
public_services = list(Organization.objects.with_badge(org_constants.PUBLIC_SERVICE))
|
|
64
|
+
assert len(public_services) == 1
|
|
65
|
+
assert org_public_service in public_services
|
|
66
|
+
|
|
67
|
+
certified = list(Organization.objects.with_badge(org_constants.CERTIFIED))
|
|
68
|
+
assert len(certified) == 1
|
|
69
|
+
assert org_certified_association in certified
|
|
70
|
+
|
|
71
|
+
associations = list(Organization.objects.with_badge(org_constants.ASSOCIATION))
|
|
72
|
+
assert len(associations) == 1
|
|
73
|
+
assert org_certified_association in associations
|
|
@@ -9,7 +9,6 @@ from udata.core.organization.constants import PUBLIC_SERVICE
|
|
|
9
9
|
from udata.core.reuse.factories import VisibleReuseFactory
|
|
10
10
|
from udata.core.site.factories import SiteFactory
|
|
11
11
|
from udata.harvest.tests.factories import HarvestSourceFactory
|
|
12
|
-
from udata.models import Badge
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
@pytest.mark.usefixtures("clean_db")
|
|
@@ -52,8 +51,7 @@ class SiteMetricTest:
|
|
|
52
51
|
def test_badges_metric(self, app):
|
|
53
52
|
site = SiteFactory.create(id=app.config["SITE_ID"])
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
public_services = [OrganizationFactory(badges=[ps_badge]) for _ in range(2)]
|
|
54
|
+
public_services = [OrganizationFactory().add_badge(PUBLIC_SERVICE) for _ in range(2)]
|
|
57
55
|
for _ in range(3):
|
|
58
56
|
OrganizationFactory()
|
|
59
57
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: udata
|
|
3
|
-
Version: 9.2.5.
|
|
3
|
+
Version: 9.2.5.dev32190
|
|
4
4
|
Summary: Open data portal
|
|
5
5
|
Home-page: https://github.com/opendatateam/udata
|
|
6
6
|
Author: Opendata Team
|
|
@@ -145,6 +145,8 @@ It is collectively taken care of by members of the
|
|
|
145
145
|
- Use hydra's RESTful endpoint URLs [#3146](https://github.com/opendatateam/udata/pull/3146)
|
|
146
146
|
- Fix flaky "duplicated email" importing fixtures tests [#3176](https://github.com/opendatateam/udata/pull/3176)
|
|
147
147
|
- Fix deprecated CircleCI config [#3181](https://github.com/opendatateam/udata/pull/3181)
|
|
148
|
+
- Use proper RESTful Hydra API endpoints [#3178](https://github.com/opendatateam/udata/pull/3178)
|
|
149
|
+
- Add a "filter by organization badge" for datasets, dataservices, reuses and organizations [#3155](https://github.com/opendatateam/udata/pull/3155]
|
|
148
150
|
|
|
149
151
|
## 9.2.4 (2024-10-22)
|
|
150
152
|
|