calpaterson / csvbase

a simple website for sharing table data - with an API
https://csvbase.com
GNU Affero General Public License v3.0
376 stars 13 forks source link

Transactions being wrongly shared across requests in tests #117

Open calpaterson opened 7 months ago

calpaterson commented 7 months ago

Description

Somewhere along the line, something has gone wrong and the session lifetime in tests not crosses multiple requests

Steps to reproduce

  1. Find a test that POSTs something and then GETs it
  2. Remove the sesh.commit() from the relevant system code

Expected result

Test fails

Actual result

Test passes

Additional details

https://github.com/calpaterson/csvbase/blob/67ed93c66bd427db318d46cf176443a59b65fb53/csvbase/web/main/bp.py#L1199 is a good candidate, when run in conjunction with the registration tests