Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 usedirect startdate #337

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion camply/providers/usedirect/usedirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,12 @@ def get_campsites_response(
-------
UseDirectAvailabilityResponse
"""
greatest_start = max(start_date, date.today() - timedelta(days=1))
data = {
"IsADA": is_ada,
"MinVehicleLength": min_vehicle_length,
"UnitCategoryId": unit_category_id,
"StartDate": start_date.strftime(UseDirectConfig.DATE_FORMAT),
"StartDate": greatest_start.strftime(UseDirectConfig.DATE_FORMAT),
"WebOnly": web_only,
"UnitTypesGroupIds": []
if unit_type_group_ids is None
Expand Down
23 changes: 23 additions & 0 deletions tests/debug_camply.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""
Debugging Script
"""

from tests.conftest import CamplyRunner


def test_debug_usedirect(cli_runner: CamplyRunner) -> None:
"""
Debug the Camply CLI - ReserveCalifornia - UseDirect

https://reservecalifornia.com/Web/#!park/726/737
"""
test_command = """
camply \
campsites \
--provider ReserveCalifornia \
--campground 737 \
--start-date 2024-04-29 \
--end-date 2024-04-30
"""
result = cli_runner.run_camply_command(command=test_command)
assert result.exit_code == 0
Loading