Use requests_mock to inject locally-defined responses into outgoing API calls. This means that we don't have to hammer the server with our test suite, and tests will run faster. It does entail some maintenance if schemas change, but that should be rare.
Add a CI action to run the base test suite on GitHub Actions. This ensures that changes to the base client can be checked in real time.
Add a "performance" marker so that benchmarking tests don't run by default (lets us test for correctness first and then check for perf regressions at the end)
The tests themselves aren't too picky about what's coming out in the response. I assume that if we're getting data, it should be more or less correct -- I'm more concerned with making sure that we handle its structures correctly.
You can skip the dozen JSON files -- the important stuff is in conftest.py and test_dgidb.py.
Tests pass locally on 3.12, but they're failing here because of issues fixed in #32 . Feel free to give a review now but we shouldn't merge until tests are passing in CI.
requests_mock
to inject locally-defined responses into outgoing API calls. This means that we don't have to hammer the server with our test suite, and tests will run faster. It does entail some maintenance if schemas change, but that should be rare.The tests themselves aren't too picky about what's coming out in the response. I assume that if we're getting data, it should be more or less correct -- I'm more concerned with making sure that we handle its structures correctly.
You can skip the dozen JSON files -- the important stuff is in
conftest.py
andtest_dgidb.py
.