diff --git a/src/main.py b/src/main.py index ea689a2..0d26a13 100644 --- a/src/main.py +++ b/src/main.py @@ -62,9 +62,10 @@ def ask_file_location() -> str: def ask_activity_id() -> str: - return questionary.text( + activity_id = questionary.text( "Enter the Strava activity ID you want to export to TrainingPeaks:" ).ask() + return re.sub(r"\D", "", activity_id) def download_tcx_file(activity_id: str, sport: str) -> None: diff --git a/tests/test_main.py b/tests/test_main.py index 302ce41..1d630ff 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,7 +1,10 @@ import os +#import sys import unittest from unittest.mock import patch +# sys.path.append(os.path.abspath('')) + from src.main import ( download_tcx_file, read_xml_file,