diff --git a/tests/storage/__init__.py b/tests/storage/__init__.py index cbc5c1f..20803d0 100644 --- a/tests/storage/__init__.py +++ b/tests/storage/__init__.py @@ -178,3 +178,7 @@ class StorageTests(object): (href, etag) for href, item, etag in s.get_multi(href for href, etag in iteritems(info)) ) == info + + def test_repr(self): + s = self._get_storage() + assert self.storage_class.__name__ in repr(s) diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index 7ed2c97..9d776c7 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -264,6 +264,10 @@ class DavStorage(Storage): useragent, dav_header=self.dav_header) self.collection = collection + # defined for _repr_attributes + self.username = username + self.url = url + @classmethod def discover(cls, url, **kwargs): if kwargs.pop('collection', None) is not None: