Commit 2a2d0ca
fix: Improved async tests. Fixing bugs discovered.
Fixing:
* Zimbra compatibility fix: omit DisplayName from MKCALENDAR body when
create-calendar.set-displayname is unsupported (see below)
* _async_put did not await the retry coroutine returned by _post_put. (Found when investigating Ox test breakages)
* _async_get_object_by_uid was missing include_completed=True, which the sync get_object_by_uid always passes. (Found when investigating Ox test breakages)
* _async_search_with_comptypes did not skip component types that the server does not support, unlike the sync _search_with_comptypes which already had this guard. (found when testing towards OX)
Test code:
* Add more fixtures and helpers for async tests
* Add 7 async tests, mirroring the sync
RepeatedFunctionalTestsBaseClass CRUD tests
* Fixing up the tests to be more or less symmetric with the sync tests
(and prettyfying the sync tests while being at it)
* Rearranged the async testing fixtures to avoid Ox throwing errors when same event ended up in multiple calendars.
prompt: An issue was created with `git bug bug new`, it has id 099db26 comment has id 009999d. Please start with Phase 1 and update the issue, but in a separate temporary worktree on a branch spun off from v3.2-preparations
prompt: continue with phase 2
prompt: tests/test_async_integration.py::TestAsyncForXandikos::test_multi_get fails (...), fix multiget in collection.py to be async-aware, following the pattern in docs/design/ASYNC_DUAL_MODE.md
followup-prompt: wait. calendar_multiget is deprecated and scheduled for deletion. Any test code exercising calendar_multiget can be removed or rewritten to use self.multiget instead.
prompt: please help me investigate the tests/test_async_integration.py::TestAsyncForZimbra::test_lookup_event breakage. It's a known problem with zimbra that a GET towards an event URL frequently yields 404, but the .load()-method should have fallbacks to .multiget(), and the caldav-server-tester in ~/caldav-server-tester claims that the current versions of Zimbra have no problems with such GETs
prompt: (lots of arguing with Claude)
prompt: (trying a new claude session) With `pytest -k 'zimbra and lookup'` the sync test passes, while the async test fails. Why? There shouldn't be any difference there? (you've already investigated two hypotheses: "zimbra does not support quoted at-sign in the URL" and "the uid has been used on another calendar, therefore the GET returns 404", both hypotheses are wrong, and does not explain the asymmetry between sync and async)
prompt: tests/test_async_integration.py::TestAsyncForOx::test_object_by_uid breaks
followup-prompt: (when giving two options on how to fix the tests / test fixtures) Isn't it a third option here too - use a static UID, but different from well_known_1? I think we should make things as symmetric as possible and reuse the same calendar. It shouldn't be persistent, except for servers that doesn't support create/delete calendars.
Mostly AI-generated, with some hands-on adjustments (AI-generating test code is fine, when done under good supervision - though I wonder a bit if I would have been able to do this faster without AI-help)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c48ecbe commit 2a2d0ca
5 files changed
Lines changed: 360 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1071 | 1071 | | |
1072 | 1072 | | |
1073 | 1073 | | |
| 1074 | + | |
1074 | 1075 | | |
1075 | 1076 | | |
1076 | 1077 | | |
| |||
1147 | 1148 | | |
1148 | 1149 | | |
1149 | 1150 | | |
1150 | | - | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
1151 | 1155 | | |
1152 | 1156 | | |
1153 | 1157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
727 | 734 | | |
728 | 735 | | |
729 | 736 | | |
| |||
747 | 754 | | |
748 | 755 | | |
749 | 756 | | |
750 | | - | |
| 757 | + | |
751 | 758 | | |
752 | 759 | | |
753 | 760 | | |
| |||
766 | 773 | | |
767 | 774 | | |
768 | 775 | | |
769 | | - | |
| 776 | + | |
770 | 777 | | |
771 | 778 | | |
772 | 779 | | |
| |||
1080 | 1087 | | |
1081 | 1088 | | |
1082 | 1089 | | |
| 1090 | + | |
1083 | 1091 | | |
1084 | 1092 | | |
1085 | 1093 | | |
| |||
1098 | 1106 | | |
1099 | 1107 | | |
1100 | 1108 | | |
1101 | | - | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
1102 | 1122 | | |
1103 | 1123 | | |
1104 | 1124 | | |
1105 | 1125 | | |
1106 | 1126 | | |
1107 | 1127 | | |
1108 | | - | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1118 | 1131 | | |
1119 | 1132 | | |
1120 | 1133 | | |
1121 | 1134 | | |
1122 | | - | |
| 1135 | + | |
1123 | 1136 | | |
1124 | 1137 | | |
1125 | 1138 | | |
| |||
1134 | 1147 | | |
1135 | 1148 | | |
1136 | 1149 | | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1137 | 1158 | | |
1138 | 1159 | | |
1139 | 1160 | | |
1140 | 1161 | | |
1141 | 1162 | | |
1142 | | - | |
| 1163 | + | |
1143 | 1164 | | |
1144 | 1165 | | |
1145 | 1166 | | |
| |||
1605 | 1626 | | |
1606 | 1627 | | |
1607 | 1628 | | |
1608 | | - | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
1609 | 1635 | | |
1610 | 1636 | | |
1611 | 1637 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
996 | 1000 | | |
997 | 1001 | | |
998 | 1002 | | |
| |||
0 commit comments