bcgov / zeva

Zero Emission Vehicles Act
Apache License 2.0
5 stars 13 forks source link

ZEVA - update credit transfer unit tests #2329

Open tim738745 opened 1 month ago

tim738745 commented 1 month ago

Describe the task The api/fixture/test/0003_add_bceid_users.py file should be updated so that each test user is assigned a distinct organization; currently, 2 distinct users can be assigned the same organization and if that happens, some credit transfer tests will fail.

Purpose Makes it so that our unit tests don't fail intermittently.

Acceptance Criteria

Developer Checklist (1) Update the code in the file mentioned above (0003_add_bceid_users.py) in the manner specified above. (2) Update the test_list_transfer and test_transfer_pass tests in test_credit_transfers.py so that they don't use transaction.on_commit() (that is there because, earlier, that was Tim's suggested solution to the intermittent failure of these tests, but it actually makes it so that the assertions don't run because the transactions are never actually committed!).