def test_instantiate_worker(self, mock_worker): worker = download_weather.main() assert worker.name == "download_weather" assert worker.description.startswith( "SalishSeaCast worker that downloads the GRIB2 files from today's 00, 06, 12, or 18" )
def test_add_verify_certs_option(self, mock_worker): worker = download_weather.main() assert worker.cli.parser._actions[6].dest == "no_verify_certs" assert worker.cli.parser._actions[6].default is False assert worker.cli.parser._actions[6].help
def test_add_resolution_arg(self, mock_worker): worker = download_weather.main() assert worker.cli.parser._actions[4].dest == "resolution" assert worker.cli.parser._actions[4].choices == {"1km", "2.5km"} assert worker.cli.parser._actions[4].default == "2.5km" assert worker.cli.parser._actions[4].help
def test_add_yesterday_option(self, mock_worker): worker = download_weather.main() assert worker.cli.parser._actions[5].dest == "yesterday" assert worker.cli.parser._actions[5].default is False assert worker.cli.parser._actions[5].help
def test_add_forecast_arg(self, mock_worker): worker = download_weather.main() assert worker.cli.parser._actions[3].dest == "forecast" assert worker.cli.parser._actions[3].choices == {"00", "06", "12", "18"} assert worker.cli.parser._actions[3].help