Skip to content

Commit

Permalink
updates unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ecoon committed May 17, 2024
1 parent 8a26162 commit 4511a58
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions watershed_workflow/sources/test/test_file_manager_nhdplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,20 @@ def nhd():
# having some robustness issues, lets just test a bunch
def test_nhdplus_url1(nhd):
url = nhd._url('0204')
assert (
'https://prd-tnm.s3.amazonaws.com/StagedProducts/Hydrography/NHDPlusHR/Beta/GDB/NHDPLUS_H_0204_HU4_GDB.zip'
== url)
assert (url.endswith('_GDB.zip'))
assert (url.split('/')[-1].startswith('NHDPLUS_H_0204_HU4'))


def test_nhdplus_url2(nhd):
url = nhd._url('0601')
assert (
'https://prd-tnm.s3.amazonaws.com/StagedProducts/Hydrography/NHDPlusHR/Beta/GDB/NHDPLUS_H_0601_HU4_GDB.zip'
== url)
assert (url.endswith('_GDB.zip'))
assert (url.split('/')[-1].startswith('NHDPLUS_H_0601_HU4'))


def test_nhdplus_url3(nhd):
url = nhd._url('1402')
assert (
'https://prd-tnm.s3.amazonaws.com/StagedProducts/Hydrography/NHDPlusHR/Beta/GDB/NHDPLUS_H_1402_HU4_GDB.zip'
== url)
assert (url.endswith('_GDB.zip'))
assert (url.split('/')[-1].startswith('NHDPLUS_H_1402_HU4'))


def test_nhdplus_url_fail(nhd):
Expand Down Expand Up @@ -86,7 +83,7 @@ def test_nhdplus12(nhd):
# download hydrography
profile, huc = nhd.get_huc('060102020103')
profile, rivers = nhd.get_hydro('060102020103')
assert (202 == len(rivers))
assert (198 == len(rivers))


def test_vaa(nhd):
Expand Down

0 comments on commit 4511a58

Please sign in to comment.