Closed rmathew8-kust closed 1 year ago
Hi Roy,
Thanks for the report. I'd happily approve a PR that makes this change and adds testing for it!
Hi - I'm trying to model my test for reports on the teams test, and am a bit unclear about the below.. could you clarify. thanks
def test_get_teams_one_team(test_client, fake_team):
test_client["requests_mock"].get(
# shouldn't this be json=[fake_team.dict()]
url=test_client["client"].teams._get_request_path(), json=fake_team.dict()
)
...
Hi Roy,
That test is testing that when the API returns a single team, instead of a list, that the code operates properly. I don't think the reports endpoint does that - in all of my testing it always returns a list.
I wish geekbot released a better documented API and had a changelog - I don't know when they changed from "questions" to "answers" in their returned object.
I don't do a lot of work with the geekbot API these days, so this has potentially been broken for a while
https://github.com/andrewthetechie/geekbot-api-py/releases/tag/v0.2.1
Thanks for the fix!
It appears that the Report class has an incorrect field name.. and there is no test coverage for this. The below change seems to fix the issue.