Commit graph

124 commits

Author SHA1 Message Date
Hugo Osvaldo Barrera
c3262d88cc Mark unused variables as such 2025-11-06 01:05:48 +01:00
Hugo Osvaldo Barrera
20cc1247ed ruff: apply auto-fixes 2025-08-29 10:03:24 +02:00
Hugo Osvaldo Barrera
b50f9def00 Ensure type annotations are backwards compatible
Related: https://github.com/pimutils/todoman/issues/544
2023-10-29 16:04:23 +01:00
Hugo Osvaldo Barrera
301aa0e16f pre-commit run --all 2023-09-24 12:41:56 +02:00
Hugo Osvaldo Barrera
24cb49f64c Remove superfluous exception parens 2023-02-10 16:57:39 +01:00
Hugo Osvaldo Barrera
37a7f9bea8 This test is not async 2023-01-31 00:21:04 +01:00
Hugo Osvaldo Barrera
b61095ad47 Async fixtures must be marked as such
pytest_asyncio now uses strict mode by default.
2022-09-20 23:01:47 +02:00
Hugo Osvaldo Barrera
c77d750ef6 Drop etesync
The current [experimental] implementation is stale, and hasn't been
maintained for a long time. Regrettably, not even its tests still work,
and there nobody interested in maintaining it.

If anyone is interested in re-implementing this in a third-party
package, I can consider adding support for pluggable storages.
2021-10-05 22:13:59 +02:00
Hugo Osvaldo Barrera
955f434d9d Also test syncing with an href with a colon
Since this was the actual problematic character.
2021-08-18 18:41:00 +02:00
Hugo Osvaldo Barrera
0650cc3bc2 Add test for #918
We're doing something wrong with UID/href quoting/unquoting, but I've
yet to figure out what.
2021-08-18 18:20:04 +02:00
Hugo Osvaldo Barrera
6281e7a237 Radicale now passes for this test 2021-08-18 18:20:04 +02:00
Hugo Osvaldo Barrera
1081a15895 Work around quirk in Fastmail
They seem to sort the parameters in an RRULE in a specific order, so
just use that by default to avoid any mismatch.
2021-08-16 22:29:16 +02:00
Hugo Osvaldo Barrera
7b493416f7
Merge pull request #920 from pimutils/meta_delete
metasync: use None as no-value and delete missing values on syncing
2021-07-26 13:07:45 +02:00
Hugo Osvaldo Barrera
5b8f00e720 Sort imports 2021-07-25 18:35:47 +02:00
Hugo Osvaldo Barrera
7379a96f73 Skip test on unsupported servers 2021-07-23 20:27:34 +02:00
Дилян Палаузов
c0ccb3d1aa metasync: use None as no-value and delete missing values on syncing
- change the interface of Storage.get_meta() and .set_meta()
  to use '' as the empty value and None as missing value.

- When a property is missing (e.g calendar-color was removed)
  in the filesystem storage delete the 'color' file, and
  in the WebDAV storage issue propertyupdate/remove call.

- remove the property from [status]/[pair]/[collection].metadata

I have adjusted, but not run the test suite.  On the other side
I tested on real system: source is CalDAV - destination is filesystem;
and source is CalDAV, destination is CalDAV (another account)
2021-07-23 19:07:02 +02:00
Hugo Osvaldo Barrera
1a1f6f0788 Initial async support
Add asyncio to the storage backends and most of the codebase. A lot of
it merely uses asyncio APIs, but still doesn't actually run several
things concurrently internally. Further improvements will be added on
top of these changes

Thanks to  Thomas Grainger (@graingert) for a few useful pointers
related to asyncio.
2021-06-26 13:40:35 +02:00
Hugo Osvaldo Barrera
2e4fc7c65a Drop unecessary hypothesis usage
This adds A LOT of time to test execution, for little benefit. While
having random data is good, in reality, most of it was just numbers, and
we rarely got very diverse data.

These hand-picked samples are as good to catch any regressions or issues
with servers.
2021-06-12 18:32:05 +02:00
Hugo Osvaldo Barrera
a9fa61040f Tidy up some collection initializations 2021-06-12 13:23:54 +02:00
Hugo Osvaldo Barrera
d2d41e5df1 Use black to auto-format the codebase 2021-05-06 19:28:54 +02:00
Hugo Osvaldo Barrera
fdc12d561c Update tests to work with hypothesis 6 2021-04-07 21:45:41 +02:00
Hugo Osvaldo Barrera
b1b4dd92fe Sort imports
I don't want to ever have to sort imports again. It's a poor use of
developer time. Automate this with a pre-commit hook, and check this on
CI.

Developers: I suggest you configure your editor to use
`reorder_python_imports`. It uses the standard sorting, and detects
first/third party libs well.
2020-06-09 14:34:45 +02:00
Hugo Osvaldo Barrera
9cb1f8d704 Drop support for Python 3.5 and 3.6 2020-06-09 14:33:14 +02:00
Hugo Osvaldo Barrera
53331fedee Skip unsupported radicale test 2020-06-09 10:42:14 +02:00
Hugo Osvaldo Barrera
308289febf Remove python2 leftover code 2020-06-08 18:40:33 +02:00
Markus Unterwaditzer
93df284d3c Make a maintenance release of vdirsyncer, fix #708 2018-02-05 08:23:45 +01:00
Markus Unterwaditzer
fa6a98ec9b Remove useless skip 2017-05-31 12:40:40 +02:00
Markus Unterwaditzer
7f80251527 Test development Radicale again (#428)
* Revert "Don't test development Radicale"

This reverts commit 7a5241101e.

* Fix Radicale test setup

* Radicale is very tolerant

* Simplify test such that output is more predictable

* Runtime version check for Radicale

* Don't create user explicitly

* stylefix

* Shorter tracebacks

Travis logs are very hard to read
2017-05-30 09:12:00 +02:00
Markus Unterwaditzer
0d9ec646d7 Initial etesync support (#614)
* Initial etesync support

* Optimized get()

* Bugfixes

* bugfixes

* Add writing operations

* collection creation WIP

* Fix collection creation

* tests wip

* wip

* Final touch for test setup

* actually skip tests

* Disable metadata tests

* Avoid polluting working tree

* Avoid importing wsgi-intercept if not installed

* Fix collection tests

* Proper teardown

* Skip bad test

* Remove vtodo

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Add docs

* Remove useless pkg

* Don't crash if etesync isn't imported

* Stylefix

* Fix more import errors

* More import errors

* Only run etesync on latest python

* Fix etesync check

* journal-manager migration
2017-04-13 16:27:11 +02:00
Markus Unterwaditzer
668220dbd7 Add fastmail testserver (#572) 2017-03-02 21:13:08 +01:00
Markus Unterwaditzer
76f794eef3 Module restructuring 2017-02-27 21:19:27 +01:00
Markus Unterwaditzer
6aeeb90259 Test iCloud (#567)
* Test iCloud

Fix #149
2017-02-27 19:52:24 +01:00
Markus Unterwaditzer
af5705f740 Return back to None as non-ETag
nextCloud now returns no etag on upload, which is why we're forced to
adapt the tests accordingly. So now we need to specify a fixed value for
"no etag returned" such that the tests can act accordingly. We also need
to test that the sync algorithm works properly with None.
2017-01-12 13:52:32 +01:00
Markus Unterwaditzer
18d8bb9fc2 Remove Python 2 support (#499)
* Discontinue Python 2.

See #219

* Remove Python 2 config option

* Remove coerce_native

* Remove PY2 variable

* s/text_type/str/g

* Flake8 fixes

* Remove str = str

* s/to_native/to_unicode/g

* Remove to_unicode = to_unicode

* Remove iteritems

* Remove itervalues

* Remove str import, flake8 fixes

* Remove urlparse compat code

* Remove with_metaclass

* Remove unused PY2 variable

* Remove getargspec_ish

* Remove to_bytes

* Remove compat module

* Remove Python 2 from Travis

* fixup! Remove urlparse compat code

* fixup! Remove urlparse compat code

* fixup! Remove compat module
2016-09-08 12:18:36 +02:00
Markus Unterwaditzer
c099b876d2 Syntax fix 2016-08-15 12:12:49 +02:00
Markus Unterwaditzer
3deba27d8b Make test_collection_arg more generic 2016-08-15 11:25:37 +02:00
Markus Unterwaditzer
97bfccdb44 Stylefix for flake8 update 2016-07-26 21:48:42 +02:00
Markus Unterwaditzer
139182ef2a Weaken test 2016-05-13 23:59:34 +02:00
Markus Unterwaditzer
61dce503a3 Fix remoteStorage tests 2016-05-13 21:56:48 +02:00
Markus Unterwaditzer
b5a690e9b2 Fix defective discovery test
Also split up in two testcases
2016-05-13 21:25:45 +02:00
Markus Unterwaditzer
d16721cde8 Replace a few skips with xfails 2016-05-02 17:07:31 +02:00
Markus Unterwaditzer
7ce0fb958f Split recurring events properly
Previously we moved each VEVENT into its own Item, now we group by UID,
if one exists.
2016-03-20 14:16:52 +01:00
Markus Unterwaditzer
b726364b93 Replace all instances of untitaker with pimutils 2016-03-15 15:36:40 +01:00
Markus Unterwaditzer
0d0902cc48 Test OS X 2016-03-12 21:34:45 +01:00
Markus Unterwaditzer
0cba8eb816 Remove outdated reference to https://github.com/owncloud/core/issues/18409 2016-03-09 16:00:06 +01:00
Markus Unterwaditzer
baa82846c0 Remove ownCloud skip for multiget crash
Ref https://github.com/owncloudarchive/calendar/issues/935
2016-03-09 15:53:47 +01:00
Markus Unterwaditzer
1f190e69ff Remove ownCloud skip for metadata glitch
Ref https://github.com/owncloud/core/issues/18409
2016-03-09 15:52:42 +01:00
Markus Unterwaditzer
4ff0680092 Merge pull request #366 from untitaker/remove-baikal-xfail
Remove old Baikal xfails
2016-03-09 12:59:13 +01:00
Markus Unterwaditzer
66bd52244d Remove old Baikal xfails
Ref #160
Ref https://github.com/fruux/sabre-dav/issues/422
2016-03-08 21:27:45 +01:00
Markus Unterwaditzer
23ea0e203f Refactor metadata None values
This fixes #358 again, in a different way.
2016-03-06 21:13:50 +01:00