Skip to content

Commit

Permalink
adjust test functions for download
Browse files Browse the repository at this point in the history
  • Loading branch information
aronsho committed Jun 21, 2023
1 parent 922f004 commit f64fd36
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions catalog_tools/download/tests/test_download_catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from numpy.testing import assert_equal, assert_allclose, assert_array_less

from catalog_tools.download.download_catalogs import apply_edwards, \
download_catalog_sed, prepare_sed_catalog
download_catalog_sed, prepare_sed_catalog, download_catalog_1


def test_apply_edwards():
Expand Down Expand Up @@ -46,7 +46,7 @@ def test_download_catalog_sed(mock_get):
# check that the downloaded catalog is correct
assert_equal(
[len(ch_cat), len(ch_cat.query("EventType != 'earthquake'"))],
[1274, 18])
[1256, 0])


@mock.patch('urllib.request.urlopen', side_effect=mocked_requests_get)
Expand All @@ -56,8 +56,12 @@ def test_prepare_sed_catalog(mock_get):
end_time = dt.datetime(2022, 1, 1)
delta_m = 0.1

ch_cat = download_catalog_sed(start_time=start_time, end_time=end_time,
min_magnitude=min_mag)
base_query = 'http://arclink.ethz.ch/fdsnws/event/1/query?'
ch_cat = download_catalog_1(
base_query=base_query,
start_time=start_time,
end_time=end_time,
min_magnitude=min_mag)

df = prepare_sed_catalog(
ch_cat,
Expand Down

0 comments on commit f64fd36

Please sign in to comment.