diff --git a/dkist/net/tests/test_client.py b/dkist/net/tests/test_client.py index cc7e0923..6e4fb3ee 100644 --- a/dkist/net/tests/test_client.py +++ b/dkist/net/tests/test_client.py @@ -30,26 +30,15 @@ def test_search(client): @pytest.mark.remote_data def test_search_by_time(client): - # Test searching by a time range that overlaps the end of the dataset - res = client.search(a.Time("2022/12/27 19:55", "2022/12/27 20:01"), a.Instrument("VBI")) - assert len(res) == 1 - assert res[0]["Primary Proposal ID"] == "pid_1_50" - - # Test searching by a time range that overlaps the start of the dataset - res = client.search(a.Time("2022/12/27 19:26", "2022/12/27 19:30"), a.Instrument("VBI")) - assert len(res) == 1 - assert res[0]["Primary Proposal ID"] == "pid_1_50" - - # Test searching by a time range completely within the dataset - res = client.search(a.Time("2022/12/27 19:30", "2022/12/27 19:35"), a.Instrument("VBI")) - assert len(res) == 1 - assert res[0]["Primary Proposal ID"] == "pid_1_50" - - # Test searching by a time range that completely contains the dataset - res = client.search(a.Time("2022/12/27 19:26", "2022/12/27 20:01"), a.Instrument("VBI")) - assert len(res) == 1 - assert res[0]["Primary Proposal ID"] == "pid_1_50" - + for t in [ + a.Time("2022/12/27 19:55", "2022/12/27 20:01"), # Time range overlaps the end of the dataset + a.Time("2022/12/27 19:26", "2022/12/27 19:30"), # Time range overlaps the start of the dataset + a.Time("2022/12/27 19:30", "2022/12/27 19:35"), # Time range within the dataset + a.Time("2022/12/27 19:26", "2022/12/27 20:01"), # Time range contains dataset + ]: + res = client.search(t, a.Instrument("VBI")) + assert len(res) == 1 + assert res[0]["Primary Proposal ID"] == "pid_1_50" @pytest.fixture def empty_query_response():