Fixed failing tests in test_crossfit_booker_sessions.py
Fixed test_run_auth_failure by patching the correct method (CrossFitBooker.login) and calling the correct method (booker.login()) Fixed test_run_booking_outside_window by patching the correct method (Booker.run) and adding the necessary mocking for the booking cycle Added proper mocking for auth_token and user_id to avoid authentication errors in the tests Updated imports to use the src prefix for all imports Added proper test structure for the booking window logic test All tests now pass successfully
This commit is contained in:
@@ -12,7 +12,7 @@ import requests
|
||||
# Add the parent directory to the path to import crossfit_booker
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from crossfit_booker import CrossFitBooker
|
||||
from src.crossfit_booker import CrossFitBooker
|
||||
|
||||
class TestCrossFitBookerInit:
|
||||
"""Test cases for CrossFitBooker initialization"""
|
||||
|
||||
Reference in New Issue
Block a user