Skip to content

Convert tests to use mocks#92

Merged
Teester merged 9 commits intomasterfrom
mock
Feb 22, 2026
Merged

Convert tests to use mocks#92
Teester merged 9 commits intomasterfrom
mock

Conversation

@Teester
Copy link
Owner

@Teester Teester commented Feb 22, 2026

Fixes #53.

Converts tests from using live wikidata data to using mocked data. This means changes in wikidata schemas and entities wont affect these tests. Additionally, running the tests is much quicker.

@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

❌ Patch coverage is 97.31544% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.75%. Comparing base (b428fe3) to head (0d70994).
⚠️ Report is 10 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tests/tests_api_v2/test_jsonld.py 95.12% 2 Missing ⚠️
tests/tests_api_v2/test_schemas.py 95.23% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #92      +/-   ##
==========================================
- Coverage   92.38%   91.75%   -0.64%     
==========================================
  Files          17       17              
  Lines        1445     1588     +143     
==========================================
+ Hits         1335     1457     +122     
- Misses        110      131      +21     
Files with missing lines Coverage Δ
tests/tests_api_v1/test_v1.py 88.46% <100.00%> (+3.92%) ⬆️
tests/tests_api_v2/test_compare_v1_v2.py 90.66% <100.00%> (+2.23%) ⬆️
tests/tests_api_v2/test_jsonld.py 96.62% <95.12%> (-1.29%) ⬇️
tests/tests_api_v2/test_schemas.py 89.50% <95.23%> (+1.55%) ⬆️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b428fe3...0d70994. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
17.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@Teester Teester merged commit 592cbb3 into master Feb 22, 2026
7 of 8 checks passed
@Teester Teester deleted the mock branch February 22, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests rely on Wikidata content

1 participant