Repository navigation
Fix backwards logic on --use-legacy-import and add tests - #845
Conversation
|
@kody start-review |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody Configuration@reviewOptions |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody Configuration@reviewOptions |
c76924e to
a2df36c
Compare
Fixes #836 (or at least improves it).
This pull request enhances the testing infrastructure for
gcalclito more accurately simulate Google Calendar API interactions, particularly for theImportICSfunctionality.Key changes include:
tests/_utils.pyandtests/conftest.py) have been updated to faithfully mimic the Google API client's two-step call pattern. This involves methods (likelist(),insert(),import_()) returning a request object, which then requires anexecute()call to perform the actual API operation. This ensures that tests precisely track which Google API method is invoked.ImportICSTest Accuracy: This improved mocking allows for more accurate verification ofgcalcli'sImportICSmethod, ensuring it correctly dispatches to either the Google Calendarevents().import_orevents().insertAPI based on event properties and the--use-legacy-importflag.tests/test_gcalcli.py, theics_contentvariable was renamed toics_filein relevantImportICStests for improved clarity.These changes provide a more robust testing environment to verify the correct logic for using the
importversusinsertAPI, especially in the context of the--use-legacy-importflag.