예제 #1
0
 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"
     )
예제 #2
0
 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
예제 #3
0
 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
예제 #4
0
 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
예제 #5
0
 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