def test_run_date(self, m_available):
     request = get_current_request()
     request.matchdict = {"results_date": "06nov16"}
     m_available.return_value = True
     data = salishseacast.nowcast_currents_physics(request)
     assert data["run_date"] == arrow.get("2016-11-06")
 def test_figures(self, m_available):
     request = get_current_request()
     request.matchdict = {"results_date": "06nov16"}
     m_available.return_value = True
     data = salishseacast.nowcast_currents_physics(request)
     assert data["figures"] == salishseacast.currents_physics_figures
 def test_no_figures_raises_httpnotfound(self, m_available):
     request = get_current_request()
     m_available.return_value = False
     with pytest.raises(HTTPNotFound):
         salishseacast.nowcast_currents_physics(request)