def test_reports_request_serializes_datetime(Session): s = Session.return_value r = Reports("api_token") r.details(workspace_id=42, when=date(2001, 1, 31)) s.get.assert_called_once_with("details", workspace_id=42, user_agent=Reports.USER_AGENT, when="2001-01-31")
def test_reports_request_serializes_datetime(Session): s = Session.return_value r = Reports('api_token') r.details(workspace_id=42, when=date(2001, 1, 31)) s.get.assert_called_once_with('details', workspace_id=42, user_agent=Reports.USER_AGENT, when='2001-01-31')
def test_reports_request_requires_workspace(): r = Reports(None) with pytest.raises(ValueError): r.details()