Skip to content

Commit

Permalink
foreign key relationships correctly instantiate
Browse files Browse the repository at this point in the history
  • Loading branch information
rvosa committed Sep 6, 2024
1 parent 8b7538c commit 318d961
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@ def test_load_bcdm(db_instance, temp_data_package):
cursor.execute("SELECT COUNT(*) FROM taxon;")
taxon_count = cursor.fetchone()[0]

bc = db_instance.get_barcode({ 'processid': 'AAASF001-17'})[0]
bc = db_instance.get_barcode({'processid': 'AAASF001-17'})[0]
taxon = bc.taxon

assert barcode_count == 999 # 1000 lines in barcode TSV, including header
assert taxon_count > 0 # There should be some distinct taxa
assert bc.identification == 'Lutzomyia cruciata'
assert taxon.bin_uri == 'BOLD:ADP3520'

finally:
# End the session
Expand Down

0 comments on commit 318d961

Please sign in to comment.