open-contracting / credere-backend

A tool that facilitates the participation of Micro, Small, and Medium businesses (MSMEs) in the Colombian public procurement market.
https://credere.readthedocs.io
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

chore: Use transaction_session_logger() only where necessary. Rename/refactor as handle_skipped_award() #249 #250

Closed jpmckinney closed 9 months ago

jpmckinney commented 10 months ago

@yolile A test is failing, because in the past we just logged at exception level and let all these errors pass through. (In production, this was more or less fine, as we'd see it in Sentry.)

Anyhow, this might be a case of the test fixtures being incorrectly configured – I haven't looked into it.

yolile commented 9 months ago

Anyhow, this might be a case of the test fixtures being incorrectly configured – I haven't looked into it.

Yes, the current tests used a list of contracts but then the same award, borrower, etc for all of them, causing duplications. This is not how the endpoint works in reality, so I just changed the contracts mock data to one contract instead of 5 and synchronized the ids, etc of the other mock files to align.

I don't think we were testing multiple contracts anyway, but if we want to do that, we might want to change our mock data or how we do the mock.

We were also using the same test hash for all of them (this was the error you first saw)

jpmckinney commented 9 months ago

Aha, thanks for explaining the resolution. Up to you then to merge :)

github-actions[bot] commented 9 months ago

Pull Request Test Coverage Report for Build 7425348975


Totals Coverage Status
Change from base Build 7397068998: -0.4%
Covered Lines: 1979
Relevant Lines: 2261

💛 - Coveralls