Skip to content

Commit

Permalink
Local tests work
Browse files Browse the repository at this point in the history
  • Loading branch information
davenquinn committed Sep 18, 2023
1 parent 0ab00af commit b2f540d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/sparrow/tests/test_sample_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ def test_sample_deletion_unauthorized(self, db):
model = db.session.query(Sample).filter_by(name="Soil 003").one()
try:
db.session.delete(model)
db.session.commit()
assert False
except ProgrammingError as err:
assert isinstance(err.orig, InsufficientPrivilege)
assert "permission denied for table sample" in str(err.orig)
db.session.rollback()

def test_sample_deletion(self, db):
"""We should be able to delete a sample and all associated data."""
Expand Down

0 comments on commit b2f540d

Please sign in to comment.