Try using nested transactions to rollback

This commit is contained in:
Ben Thorner
2021-04-07 12:17:10 +01:00
parent 7806bb5246
commit 0528d7e5f2
8 changed files with 36 additions and 24 deletions

View File

@@ -233,6 +233,7 @@ def test_add_service_to_organisation(sample_service, sample_organisation):
sample_organisation.crown = False
dao_add_service_to_organisation(sample_service, sample_organisation.id)
db.session.commit()
assert len(sample_organisation.services) == 1
assert sample_organisation.services[0].id == sample_service.id