Skip to content

Commit

Permalink
Test the type guard...
Browse files Browse the repository at this point in the history
  • Loading branch information
RoDuth committed Nov 21, 2024
1 parent db9bbc1 commit 9303e65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bauble/plugins/synclone/test_synclone.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,13 @@ def test_fails_early_if_no_db_engine(self):
)
db.engine = orig_engine

def test_fails_early_if_no_db_session(self):
db.Session = None
clone_uri = "sqlite:///test.db"
self.assertRaises(
error.DatabaseError, ToSync.add_batch_from_uri, clone_uri
)

def add_clone_history(self, clone_engine, history_id, values):
# add clone_history_id
meta = bauble.meta.BaubleMeta.__table__
Expand Down

0 comments on commit 9303e65

Please sign in to comment.