aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
Commit message (Collapse)AuthorAgeFilesLines
* ingest: fix XML ingest test fileBryan Newbold2020-11-051-1/+1
|
* ingest: progress on HTML ingestBryan Newbold2020-11-052-2/+44
|
* ingest: tests for basic XML ingestBryan Newbold2020-11-052-0/+18
|
* ingest: basic checks for ingest_typeBryan Newbold2020-11-052-1/+7
|
* Merge branch 'bnewbold-202009-polish' into 'master'Martin Czygan2020-09-292-6/+6
|\ | | | | | | | | fatcat.wiki 2020-09 polish See merge request webgroup/fatcat!84
| * lint cleanupsBryan Newbold2020-09-171-2/+0
| |
| * web: route constraints on fcids and UUIDsBryan Newbold2020-09-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | Instead of accepting any string for these parameters and throwing a 400 error if not the correct type, implement better route matching at the framework level and return more 404s. This resolves several outstanding sentry exceptions. The "flask-uuid" was imported and seems to have been configured for this purpose previously, but I guess I never finished configuring it.
* | address spammy datacite titlesMartin Czygan2020-09-231-0/+6
|/ | | | | | | | | seemingly from zenodo: * https://fatcat.wiki/release/rzcpjwukobd4pj36ipla22cnoi * https://doi.org/10.5281/zenodo.4041777 About 3400 records with "FULL MOVIE" in title, currently.
* datacite: handle case of empty-string versionBryan Newbold2020-09-102-1/+2
| | | | | Includes a tiny tweak to the datacite import sample file to test this code path.
* generic file entity clean-ups as part of file_meta importerBryan Newbold2020-09-021-0/+99
|
* fixes and test coverage for file_meta importerBryan Newbold2020-08-212-0/+68
|
* datacite importer: update test cases for 'Additional file' as component, not ↵Bryan Newbold2020-08-115-5/+5
| | | | stub
* datacite import: figshare-specific hacksBryan Newbold2020-08-111-0/+1
|
* fix typo bug resulting in lost/bad ext_id web editsBryan Newbold2020-07-311-0/+14
|
* implement webface entity deletionBryan Newbold2020-07-311-0/+57
|
* fix search redirect codes in new testsBryan Newbold2020-07-301-4/+4
|
* wire up new TOML viewsBryan Newbold2020-07-302-20/+62
|
* basic toml transform helperBryan Newbold2020-07-301-0/+22
|
* simple search route increased coverageBryan Newbold2020-07-301-0/+27
|
* minor lint fixesBryan Newbold2020-07-301-1/+0
|
* coverage search: 'recent' endpoint test (minimal)Bryan Newbold2020-07-301-1/+32
|
* expand test coverage of new preservation viewsBryan Newbold2020-07-301-15/+122
|
* refactor coverage tests/mocksBryan Newbold2020-07-305-39/+80
|
* coverage test mock fixesBryan Newbold2020-07-301-14/+51
|
* lint coverage changes (so far)Bryan Newbold2020-07-302-15/+3
|
* include new-style preservation+release_type aggs in container statsBryan Newbold2020-07-301-1/+12
|
* add regression test for broken container coverageBryan Newbold2020-07-302-57/+98
| | | | also shuffle around search/coverage test files
* small lint fixesBryan Newbold2020-07-241-1/+0
|
* finish backend refactoring of search codeBryan Newbold2020-07-241-2/+77
|
* update web_search tests to mock ES clientBryan Newbold2020-07-242-45/+47
| | | | | | Instead of using 'responses' mock of 'requests' library. Tried using 'elasticmock' helper but it didn't work.
* refactor release and container searchBryan Newbold2020-07-241-5/+2
| | | | | | | | | | Based on fatcat-scholar refactoring. This doesn't include refactoring of stats, aggregates, or histograms yet, just the direct queries. Don't have any test coverage yet; intend to try elasticmock or figuring out how to ingest mock JSON results directly.
* Merge branch 'bnewbold-more-lint-fixes' into 'master'Martin Czygan2020-07-245-6/+5
|\ | | | | | | | | more lint fixes See merge request webgroup/fatcat!69
| * fix actual typo in tests (caught by lint)Bryan Newbold2020-07-231-2/+2
| |
| * simple lint (flake8) fixes in testsBryan Newbold2020-07-234-4/+3
| | | | | | | | | | | | The pytest fixture syntax interacts weirdly with flake8 tests, so ignore the "redefinition" and "unused variable" errors more carefully for .py files under ./tests/
* | make in_kbart transform inclusive of last yearBryan Newbold2020-07-231-0/+46
|/ | | | | | | | | | | | | | | | | Frequently when looking at preservation coverage of journals, the current year shows as "un-preserved" when in fact there is robust KBART (keepers, eg CLOCKSS/Portico) coverage. This is partially because we don't update containers with KBART year spans very frequently (which is on us), and partially because KBART reports are often a bit out of day (eg, doesn't show coverage for the current year. For that matter, they probably take a few months to update the previous year as well, but that is a larger time span to fudge over. This patch means we will count Portico/LOCKSS/etc coverage for "last year" to count as coverage of publications dated "this year". Note that for this to be effective/correct, it is assumed that we will update containers with coverage year spans at least once a year, and that we will re-index all releases at least once a year.
* datacite: resolve formatting issues in testsMartin Czygan2020-07-1045-150/+54
|\
| * lint (flake8) python test filesBryan Newbold2020-07-0145-168/+71
| |
* | datacite: adjust testsMartin Czygan2020-07-104-10/+6
| |
* | wip: contrib, GH59Martin Czygan2020-07-101-229/+361
| |
* | wip: contrib, GH59Martin Czygan2020-07-105-3/+105
| |
* | datacite: address duplicated contributor issueMartin Czygan2020-07-075-11/+94
|/ | | | | | | Use string comparison. * https://fatcat.wiki/release/spjysmrnsrgyzgq6ise5o44rlu/contribs * https://api.datacite.org/dois/10.25940/roper-31098406
* datacite: improve license mappingMartin Czygan2020-06-301-0/+14
| | | | via "missed potential license", refs #58
* datacite: hard cast possible date value to stringMartin Czygan2020-06-291-0/+1
|
* datacite: fix test docsMartin Czygan2020-05-291-3/+3
|
* Merge branch 'bnewbold-ingest-stage' into 'master'Martin Czygan2020-05-282-7/+41
|\ | | | | | | | | verify release_stage in ingest importer See merge request webgroup/fatcat!52
| * regression test for release_stage mismatch with ingest requestBryan Newbold2020-05-262-7/+41
| |
* | rename HarvestState.next() to HarvestState.next_span()Bryan Newbold2020-05-261-2/+2
|/ | | | | | | | | "span" short for "timespan" to harvest; there may be a better name to use. Motivation for this is to work around a pylint erorr that .next() was not callable. This might be a bug with pylint, but .next() is also a very generic name.
* HACK: try to squelch pylint in CIBryan Newbold2020-05-261-2/+2
| | | | | | | | | | | | | | | | | Gitlab CI is showing lint errors like: =================================== FAILURES =================================== 6316 _______________________ [pylint] tests/harvest_state.py ________________________ 6317 E: 19,11: hs.next is not callable (not-callable) 6318 E: 33,11: hs.next is not callable (not-callable) 6319 E: 19,11: hs.next is not callable (not-callable) [...] this is confusing as we use pipenv with a lock, so I should see the exact same errors locally. This commit is a hack to try and fix this and unbreak builds until we can debug further.
* Merge remote-tracking branch 'github/master'Bryan Newbold2020-05-221-5/+5
|\
| * Indentity is not the same this as equality in PythonChristian Clauss2020-05-141-5/+5
| |