Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 866 Bytes

File metadata and controls

2 lines (2 loc) · 866 Bytes

With the unit test in test_app.py we test two functions: search_term and update_dropdown_options. For search_term we test that the function finds the term in the dataframe and also test that the return is empty if a search term is provided that is not in the dataframe. Fro update_dropdown_options, we want to check that if we provide an empty string as search value a PreventUpdate error is raised. We also test that if search_term is None the error is raised. We check that the options are correctly updated when a new search value is provided in test_update_dropdown_options_with_search_value() . One thing that might occur is that when updating the options, the previously existing values are erased and only the newly found options are returned. To ensure that this is not the case the test_update_dropdown_options_with_state function is used.