Skip to content

Commit

Permalink
🐛 usedirect startdate
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Apr 26, 2024
1 parent 4cb9b1e commit 0202011
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
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

0 comments on commit 0202011

Please sign in to comment.