tasks: CalDAV provider (Nextcloud Tasks/iOS), review reports unknown values; bump stops pointing at release (#139)
Files changed: - CHANGES.md - INSTALL.md - VERSION - instructions/dev/version-parts.md - instructions/gtd-weekly-review/SKILL.md - tools/CONTRACT.md - tools/chemenu/commands/doctor.py - tools/chemenu/commands/version_cmd.py - tools/chemenu/review.py - tools/chemenu/tasks/__init__.py - tools/chemenu/tasks/caldav.py - tools/chemenu/tasks/config.py - tools/chemenu/tests/test_caldav.py - tools/chemenu/tests/test_doctor.py - tools/chemenu/tests/test_review.py - tools/requirements.txt
This commit is contained in:
1 parent
4446424e01
commit
6d53c55d0d
16 files changed
+1912
-14
No files matched your search
@@ -413,6 +413,39 @@ def test_tasks_provider_ok_but_names_api_unreachable_when_configured(instance):
|
||||
assert "not reachable" in detail
|
||||
|
||||
|
||||
def test_tasks_provider_fails_on_a_bad_caldav_section(instance):
|
||||
(config.ROOT / config.TASKS_CONFIG_FILENAME).write_text(
|
||||
'{"schema": 1, "provider": "caldav", "thresholds": '
|
||||
'{"stalled_waiting_days": 14, "unpaged_project_weeks": 3, "someday_stale_months": 5}, '
|
||||
'"caldav": {}}',
|
||||
encoding="utf-8",
|
||||
)
|
||||
checks = doctor.run_doctor()
|
||||
assert _status(checks, "tasks-provider") == "FAIL"
|
||||
|
||||
|
||||
def test_tasks_provider_ok_but_names_caldav_unreachable_when_configured(instance):
|
||||
(config.ROOT / config.TASKS_CONFIG_FILENAME).write_text(
|
||||
json.dumps({
|
||||
"schema": 1, "provider": "caldav",
|
||||
"thresholds": {
|
||||
"stalled_waiting_days": 14, "unpaged_project_weeks": 3,
|
||||
"someday_stale_months": 5,
|
||||
},
|
||||
"caldav": {
|
||||
"url": "http://127.0.0.1:1/cal/", "username": "u", "app_password": "p",
|
||||
"inbox_list": "Inbox", "someday_list": "Someday",
|
||||
},
|
||||
}),
|
||||
encoding="utf-8",
|
||||
)
|
||||
checks = doctor.run_doctor()
|
||||
assert _status(checks, "tasks-provider") == "OK"
|
||||
detail = _detail(checks, "tasks-provider")
|
||||
assert "caldav" in detail
|
||||
assert "unreachable" in detail
|
||||
|
||||
|
||||
def test_missing_generated_file_fails(instance):
|
||||
config.LOG_FILE.unlink()
|
||||
checks = doctor.run_doctor()
|
||||
|
||||
Reference in new issue
Block a user