Skip to content

Commit

Permalink
Add M51 load data test
Browse files Browse the repository at this point in the history
  • Loading branch information
duytnguyendtn committed Jul 23, 2024
1 parent 6ffdcd7 commit 2cbe1d9
Showing 1 changed file with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def _init_voplugin(self, imviz_helper):

# Sets common args for Remote Testing
vo_plugin.viewer_selected = "Manual"
vo_plugin.source = "M32"
vo_plugin.waveband_selected = "infrared"
vo_plugin.source = "M51"
vo_plugin.waveband_selected = "optical"

return vo_plugin

Expand All @@ -106,3 +106,24 @@ def test_coverage_toggle(self, imviz_helper):

# Nonfiltered resources should be more than filtered resources
assert len(nonfiltered_resources) > len(filtered_resources)

def test_HSTM51_load_data(self, imviz_helper):
# Set Common Args
vo_plugin = self._init_voplugin(imviz_helper)

# Select HST.M51 survey
vo_plugin.resource_filter_coverage = False # Coverage not implemented for HST.M51
vo_plugin.vue_query_registry_resources()
assert "HST.M51" in vo_plugin.resources
vo_plugin.resource_selected = "HST.M51"

# Query resource
vo_plugin.vue_query_resource()
assert len(vo_plugin.table.items) > 0

# Load first data product:
vo_plugin.table.selected_rows = [vo_plugin.table.items[0]] # Select first entry
vo_plugin.vue_load_selected_data()
import time; time.sleep(10)
assert len(imviz_helper.app.data_collection) == 1
assert "M51_HST.M51" in imviz_helper.data_labels[0]

0 comments on commit 2cbe1d9

Please sign in to comment.