def test_uninitialised_search_page(empty_client: FlaskClient, summary_store: SummaryStore): # Populate one product, so they don't get the usage error message ("run cubedash generate") summary_store.refresh_product(summary_store.index.products.get_by_name('ls7_nbar_albers')) summary_store.get_or_update('ls7_nbar_albers') # Then load a completely uninitialised product. html = get_html(empty_client, '/datasets/ls7_nbar_scene') search_results = html.find('.search-result a') assert len(search_results) == 4
def test_uninitialised_overview( unpopulated_client: FlaskClient, summary_store: SummaryStore ): # Populate one product, so they don't get the usage error message ("run cubedash generate") # Then load an unpopulated product. summary_store.refresh_product(summary_store.get_dataset_type("ls7_nbar_albers")) summary_store.get_or_update("ls7_nbar_albers") html = get_html(unpopulated_client, "/ls7_nbar_scene/2017") # The page should load without error, but will display 'unknown' fields assert html.find("h2", first=True).text == "ls7_nbar_scene: Landsat 7 NBAR 25 metre" assert "Unknown number of datasets" in html.text assert "No data: not yet generated" in html.text