Testing¶
tests.conftest module¶
-
tests.conftest.mock_app() → dash.dash.Dash¶ Create a test app using mocked data
-
tests.conftest.pytest_setup_options()¶
tests.test_callbacks module¶
Functions for testing the callbacks in the app
A mock app is used to prevent repeatedly downloading the data from OWID as well as to speed up tests
dash_duo.driver.maximize_window() is necessary for accessing the dropdown Otherwise, selenium cannot click on it.
-
tests.test_callbacks.test_dccb001_data_table(dash_duo, mock_app)¶ Test that navigating to data table opens expected page
-
tests.test_callbacks.test_dccb002_interactive_scatter(dash_duo, mock_app)¶ Test that navigating to scatter plot opens expected page and that the callbacks are triggered appropriately
-
tests.test_callbacks.test_dccb003_interactive_map(dash_duo, mock_app)¶ Test that navigating to map opens expected page and that the callbacks are triggered appropriately
-
tests.test_callbacks.test_dccb004_overview_leds(dash_duo, mock_app)¶ Test that navigating to Overviews opens expected page and that the callbacks are triggered appropriately