Repository: pimutils/khal
Pull request #863 (2019-04-11 16:25:44)

adding a .desktop file
Couldn't really test it because of this error
```
LookupError: setuptools-scm was unable to detect version for '/build/khal'.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
```
but should be ok



Patch:
diff --git a/AUTHORS.txt b/AUTHORS.txt
index 6a1fcd7..42d95d3 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -35,5 +35,3 @@ Thomas Kluyver - thomas [at] kluyver [dot] me [dot] uk
 Tobias Brummer - hallo [at] t0bybr.de - https://t0bybr.de
 Amanda Hickman - amanda [at] velociraptor [dot] info
 Raef Coles - raefcoles [at] gmail [dot] com
-Nito Martinez - nito [at] qindel [dot] com - http://qindel.com http://theqvd.com
-Florian Wehner - florian [at] whnr [dot] de
\ No newline at end of file
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 7dba27f..0f0d3b7 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -7,23 +7,15 @@ Package maintainers and users who have to manually update their installation
 may want to subscribe to `GitHub's tag feed
 <https://github.com/geier/khal/tags.atom>`_.
 
-
-0.10.1
-======
-2019-03-30
-
-* FIX error with the new color priority system and `discover` calendar type
-* FIX search results in ikhal are ordered, same as in `khal search`
-
 0.10.0
 ======
-2019-03-25
+not released yet
 
 * only dateutil < 2.7 is supported
 
 * NEW DEPENDENCY added click_log  >= 0.2.0
 * NEW DEPENDENCY for Python 3.4: typing
-* UPDATED DEPENDENCY icalendar>=4.03
+* UPDATED DEPENDENCY icalendar>=3.11.7
 * DROPPED support for Python 3.3
 * vdirsyncer is still a test dependency (and always has been)
 
@@ -49,8 +41,6 @@ may want to subscribe to `GitHub's tag feed
 * NEW khal learned the ``--logfile/-l LOGFILE`` flag which allows logging to a
   file
 * NEW format can now print the duration of an event with `{duration}`
-* NEW format supports `{nl}`, `{tab}`, `{bell}`. `{status}` has a whitespace
-  like `{cancelled}`
 * NEW configuration option: [view]monthdisplay = firstday|firstfullweek,
   if set to 'firstday', khal displays the month name as soon as any day
   in the week is within the new month. If set to 'firstfullweek', khal
@@ -67,8 +57,6 @@ may want to subscribe to `GitHub's tag feed
   the color of the calendar with highest priority. If multiple calendars have
   the same highest priority, it falls back to the previous system.
 
-* NEW format can now print the organizer of the event with '(organizer)'
-
 0.9.8
 =====
 released 2017-10-05
diff --git a/doc/source/news.rst b/doc/source/news.rst
index 21985f4..df485e1 100644
--- a/doc/source/news.rst
+++ b/doc/source/news.rst
@@ -12,7 +12,6 @@ available as an `rss feed <https://lostpackets.de/khal/index.rss>`_ |rss|.
     :title: khal news
     :link: http://lostpackets.de/khal/
 
-    news/khal0100
     news/khal098
     news/khal097
     news/khal096
diff --git a/doc/source/news/khal0100.rst b/doc/source/news/khal0100.rst
deleted file mode 100644
index 1bcfb24..0000000
--- a/doc/source/news/khal0100.rst
+++ /dev/null
@@ -1,51 +0,0 @@
-khal v0.10.0 released
-=====================
-
-.. feed-entry::
-        :date: 2019-03-25
-
-This is not only the first bugfix release in more than a year, but also the
-first release containing new features in nearly two years.
-
-v0.10.0 contains some breaking changes from earlier versions of khal, most
-notably the removal of the default command [1]_. For users who want the old
-functionality back, a shell function seems to be the best option. Please use the
-wiki_ to share your solutions. Have a look at the Changelog_ for more changes
-and fixes.
-
-With this release I want to bring the aforementioned changes to more people,
-find (and fix) as many more bugs as possible and then release a version 1.0.
-
-For convenience issues, khal will only be available on pypi_ in the future, with
-minor versions (v0.10.x) not getting announced here any more. Users and packagers
-who want to stay on a current version of khal are therefore advised to watch
-pypi_ for new versions.
-
-.. Important::
-
-   **Contributors and maintainers wanted**
-
-   As I find myself having less and less time to devout to khal, I'm looking for
-   more developers and maintainers. Even if you are not a python developer, your
-   help with helping new users and triaging and prioritizing bugs is very much
-   appreciated. 
-
-   If you don't know how to contact the current team, open an `issue on github`_.
-
-   **vdirsyncer**, which many khal users are probably dependend on, is also
-   looking for new maintainers_.
-
-
-.. [1] The implementation of the default command proved to be a source of
-   constant headache for users and developers alike. This was due to the library chosen
-   for handling argument parsing.
-
-   Feel free to share other suggestions in the wiki_.
-
-.. _pypi: https://pypi.python.org/pypi/khal/
-.. _issue on github: https://github.com/pimutils/khal/issues
-.. _issues: https://github.com/pimutils/khal/issues
-.. _wiki: https://github.com/pimutils/khal/wiki/Default-command-alternatives
-.. _changelog: changelog.html#id2
-.. _vdirsyncer: https://github.com/pimutils/vdirsyncer
-.. _maintainers: https://github.com/pimutils/vdirsyncer/issues/790
diff --git a/doc/source/usage.rst b/doc/source/usage.rst
index 2911d2e..1bc8383 100644
--- a/doc/source/usage.rst
+++ b/doc/source/usage.rst
@@ -151,17 +151,6 @@ Several options are common to almost all of :program:`khal`'s commands
        The string `CANCELLED` (plus one blank) if the event's status is
        cancelled, otherwise nothing.
 
-   organizer
-       The organizer of the event. If the format has CN then it returns "CN (email)"
-       if CN does not exist it returns just the email string. Example:
-       ORGANIZER;CN=Name Surname:mailto:name@mail.com
-       returns
-       Name Surname (name@mail.com)
-       and if it has no CN attribute it returns the last element after the colon:
-       ORGANIZER;SENT-BY="mailto:toemail@mail.com":mailto:name@mail.com
-       returns
-       name@mail.com
-
    By default, all-day events have no times. To see a start and end time anyway simply
    add `-full` to the end of any template with start/end, for instance
    `start-time` becomes `start-time-full` and will always show start and end times (instead
diff --git a/khal/cli.py b/khal/cli.py
index fa1686d..0ae2b13 100644
--- a/khal/cli.py
+++ b/khal/cli.py
@@ -335,7 +335,7 @@ def _get_cli():
     @click.option('--location', '-l',
                   help=('The location of the new event.'))
     @click.option('--categories', '-g',
-                  help=('The categories of the new event, comma separated.'))
+                  help=('The categories of the new event.'))
     @click.option('--repeat', '-r',
                   help=('Repeat event: daily, weekly, monthly or yearly.'))
     @click.option('--until', '-u',
@@ -357,9 +357,10 @@ def _get_cli():
         everything behind them is taken as the event's description.
         '''
         if not info and not interactive:
-            raise click.BadParameter(
-                'no details provided, did you mean to use --interactive/-i?'
-            )
+                raise click.BadParameter(
+                    'no details provided, '
+                    'did you mean to use --interactive/-i?'
+                )
 
         calendar = calendar or ctx.obj['conf']['default']['default_calendar']
         if calendar is None:
diff --git a/khal/controllers.py b/khal/controllers.py
index e774d6c..9d2d79b 100644
--- a/khal/controllers.py
+++ b/khal/controllers.py
@@ -187,9 +187,9 @@ def get_events_between(
         # to understand what's going on here this way
         if notstarted:
             if event.allday and event.start < original_start.date():
-                continue
+                    continue
             elif not event.allday and event.start_local < original_start:
-                continue
+                    continue
         if seen is not None and event.uid in seen:
             continue
 
@@ -355,8 +355,6 @@ def new_from_args(collection, calendar_name, conf, dtstart=None, dtend=None,
                   categories=None, repeat=None, until=None, alarms=None,
                   timezone=None, format=None, env=None):
     """Create a new event from arguments and add to vdirs"""
-    if isinstance(categories, str):
-        categories = list([category.strip() for category in categories.split(',')])
     try:
         event = utils.new_event(
             locale=conf['locale'], location=location, categories=categories,
@@ -497,10 +495,7 @@ def edit_event(event, collection, locale, allow_quit=False, width=80):
             value = prompt(question, default)
             if allow_none and value == "None":
                 value = ""
-            if attr == 'categories':
-                getattr(event, "update_" + attr)(list([cat.strip() for cat in value.split(',')]))
-            else:
-                getattr(event, "update_" + attr)(value)
+            getattr(event, "update_" + attr)(value)
             edited = True
 
         if edited:
@@ -520,9 +515,9 @@ def edit(collection, search_string, locale, format=None, allow_past=False, conf=
     for event in events:
         if not allow_past:
             if event.allday and event.end < now.date():
-                continue
+                    continue
             elif not event.allday and event.end_local < now:
-                continue
+                    continue
         event_text = textwrap.wrap(event.format(format, relative_to=now), term_width)
         echo(''.join(event_text))
         if not edit_event(event, collection, locale, allow_quit=True, width=term_width):
diff --git a/khal/khalendar/event.py b/khal/khalendar/event.py
index ddd5cf6..5c006c5 100644
--- a/khal/khalendar/event.py
+++ b/khal/khalendar/event.py
@@ -423,16 +423,13 @@ class Event(object):
 
     @property
     def categories(self):
-        try:
-            return self._vevents[self.ref].get('CATEGORIES', '').to_ical().decode('utf-8')
-        except AttributeError:
-            return ''
+        return self._vevents[self.ref].get('CATEGORIES', '')
 
     def update_categories(self, categories):
-        assert isinstance(categories, list)
-        self._vevents[self.ref].pop('CATEGORIES', False)
-        if categories:
-            self._vevents[self.ref].add('CATEGORIES', categories)
+        if categories.strip():
+            self._vevents[self.ref]['CATEGORIES'] = categories
+        else:
+            self._vevents[self.ref].pop('CATEGORIES', False)
 
     @property
     def description(self):
@@ -576,7 +573,6 @@ class Event(object):
         attributes["repeat-symbol"] = self._recur_str
         attributes["repeat-pattern"] = self.recurpattern
         attributes["title"] = self.summary
-        attributes["organizer"] = self.organizer.strip()
         attributes["description"] = self.description.strip()
         attributes["description-separator"] = ""
         if attributes["description"]:
@@ -607,7 +603,7 @@ class Event(object):
         attributes['tab'] = '\t'
         attributes['bell'] = '\a'
 
-        attributes['status'] = self.status + ' ' if self.status else ''
+        attributes['status'] = self.status
         attributes['cancelled'] = 'CANCELLED ' if self.status == 'CANCELLED' else ''
         return format_string.format(**dict(attributes)) + attributes["reset"]
 
diff --git a/khal/parse_datetime.py b/khal/parse_datetime.py
index 5252c5d..f6e0ae7 100644
--- a/khal/parse_datetime.py
+++ b/khal/parse_datetime.py
@@ -358,7 +358,7 @@ def guessrangefstr(daterange, locale, adjust_reasonably=False,
                 else:
                     end = start + default_timedelta_datetime
             elif end.lower() == 'eod':
-                end = dt.datetime.combine(start.date(), dt.time.max)
+                    end = dt.datetime.combine(start.date(), dt.time.max)
             elif end.lower() == 'week':
                 start -= dt.timedelta(days=(start.weekday() - locale['firstweekday']))
                 end = start + dt.timedelta(days=8)
diff --git a/khal/settings/utils.py b/khal/settings/utils.py
index ed20432..5962b53 100644
--- a/khal/settings/utils.py
+++ b/khal/settings/utils.py
@@ -153,7 +153,7 @@ def get_color_from_vdir(path):
         color = Vdir(path, '.ics').get_meta('color')
     except CollectionNotFoundError:
         color = None
-    if color is None or color == '':
+    if color is None or color is '':
         logger.debug('Found no or empty file `color` in {}'.format(path))
         return None
     color = color.strip()
@@ -226,8 +226,7 @@ def config_checks(
         calendar = {'path': vdir,
                     'color': _get_color_from_vdir(vdir),
                     'type': _get_vdir_type(vdir),
-                    'readonly': False,
-                    'priority': 10,
+                    'readonly': False
                     }
 
         # get color from config if not defined in vdir
diff --git a/khal/ui/__init__.py b/khal/ui/__init__.py
index f37a763..7deb3fe 100644
--- a/khal/ui/__init__.py
+++ b/khal/ui/__init__.py
@@ -1120,7 +1120,7 @@ class ClassicView(Pane):
     def _search(self, search_term):
         """search for events matching `search_term"""
         self.window.backtrack()
-        events = sorted(self.collection.search(search_term))
+        events = list(self.collection.search(search_term))
         event_list = []
         event_list.extend([
             urwid.AttrMap(
diff --git a/khal/ui/calendarwidget.py b/khal/ui/calendarwidget.py
index c36db42..1ebe94f 100644
--- a/khal/ui/calendarwidget.py
+++ b/khal/ui/calendarwidget.py
@@ -312,9 +312,9 @@ class CListBox(urwid.ListBox):
 
     def keypress(self, size, key):
         if key in self.keybindings['mark'] + ['esc'] and self._marked:
-            self._unmark_all()
-            self._marked = False
-            return
+                self._unmark_all()
+                self._marked = False
+                return
         if key in self.keybindings['mark']:
             self._marked = {'date': self.body.focus_date,
                             'pos': (self.focus_position, self.focus.focus_col)}
diff --git a/khal/ui/editor.py b/khal/ui/editor.py
index a168818..94cadca 100644
--- a/khal/ui/editor.py
+++ b/khal/ui/editor.py
@@ -433,7 +433,7 @@ class EventEditor(urwid.WidgetWrap):
         self.event.update_summary(get_wrapped_text(self.summary))
         self.event.update_description(get_wrapped_text(self.description))
         self.event.update_location(get_wrapped_text(self.location))
-        self.event.update_categories(get_wrapped_text(self.categories).split(','))
+        self.event.update_categories(get_wrapped_text(self.categories))
 
         if self.startendeditor.changed:
             self.event.update_start_end(
diff --git a/khal/utils.py b/khal/utils.py
index 6e6013b..a26048d 100644
--- a/khal/utils.py
+++ b/khal/utils.py
@@ -655,7 +655,7 @@ def cal_from_ics(ics):
     except ValueError as error:
         if (len(error.args) > 0 and isinstance(error.args[0], str) and
                 error.args[0].startswith('Offset must be less than 24 hours')):
-            logger.warning(
+            logger.warn(
                 'Invalid timezone offset encountered, '
                 'timezone information may be wrong: ' + str(error.args[0])
             )
diff --git a/misc/khal.desktop b/misc/khal.desktop
new file mode 100644
index 0000000..e3c9f82
--- /dev/null
+++ b/misc/khal.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=ikhal
+Categories=Calendar;ConsoleOnly;
+GenericName=Calendar application
+Comment=Terminal CLI calendar application
+Exec=ikhal
+Terminal=true
+Type=Application
+
+MimeType=text/calendar
diff --git a/setup.py b/setup.py
index b3985ff..309f133 100755
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@ if sys.version_info < (3, 4):
 requirements = [
     'click>=3.2',
     'click_log>=0.2.0',
-    'icalendar>=4.0.3',
+    'icalendar>=3.11.7',
     'urwid',
     'pyxdg',
     'pytz',


Test patch:
diff --git a/tests/cal_display_test.py b/tests/cal_display_test.py
index 062c70c..e3b247d 100644
--- a/tests/cal_display_test.py
+++ b/tests/cal_display_test.py
@@ -45,9 +45,9 @@ class testCollection():
 def test_get_calendar_color():
 
     exampleCollection = testCollection()
-    exampleCollection.addCalendar('testCalendar1', 'dark red', 20)
+    exampleCollection.addCalendar('testCalendar1', 'dark red',    20)
     exampleCollection.addCalendar('testCalendar2', 'light green', 10)
-    exampleCollection.addCalendar('testCalendar3', '', 10)
+    exampleCollection.addCalendar('testCalendar3', '',            10)
 
     assert get_calendar_color('testCalendar1', 'light blue', exampleCollection) == 'dark red'
     assert get_calendar_color('testCalendar2', 'light blue', exampleCollection) == 'light green'
@@ -62,7 +62,7 @@ def test_get_color_list():
 
     # test different priorities
     exampleCollection1 = testCollection()
-    exampleCollection1.addCalendar('testCalendar1', 'dark red', 20)
+    exampleCollection1.addCalendar('testCalendar1', 'dark red',    20)
     exampleCollection1.addCalendar('testCalendar2', 'light green', 10)
 
     testList1 = get_color_list(exampleCalendarList, 'light_blue', exampleCollection1)
@@ -71,7 +71,7 @@ def test_get_color_list():
 
     # test same priorities
     exampleCollection2 = testCollection()
-    exampleCollection2.addCalendar('testCalendar1', 'dark red', 20)
+    exampleCollection2.addCalendar('testCalendar1', 'dark red',    20)
     exampleCollection2.addCalendar('testCalendar2', 'light green', 20)
 
     testList2 = get_color_list(exampleCalendarList, 'light_blue', exampleCollection2)
@@ -81,16 +81,16 @@ def test_get_color_list():
 
     # test duplicated colors
     exampleCollection3 = testCollection()
-    exampleCollection3.addCalendar('testCalendar1', 'dark red', 20)
-    exampleCollection3.addCalendar('testCalendar2', 'dark red', 20)
+    exampleCollection3.addCalendar('testCalendar1', 'dark red',    20)
+    exampleCollection3.addCalendar('testCalendar2', 'dark red',    20)
 
     testList3 = get_color_list(exampleCalendarList, 'light_blue', exampleCollection3)
     assert len(testList3) == 1
 
     # test indexing operator (required by str_highlight_day())
     exampleCollection4 = testCollection()
-    exampleCollection4.addCalendar('testCalendar1', 'dark red', 20)
-    exampleCollection4.addCalendar('testCalendar2', 'dark red', 20)
+    exampleCollection4.addCalendar('testCalendar1', 'dark red',    20)
+    exampleCollection4.addCalendar('testCalendar2', 'dark red',    20)
 
     testList3 = get_color_list(exampleCalendarList, 'light_blue', exampleCollection4)
     assert testList3[0] == 'dark red'
diff --git a/tests/event_test.py b/tests/event_test.py
index 2bf2d6e..d385272 100644
--- a/tests/event_test.py
+++ b/tests/event_test.py
@@ -52,7 +52,7 @@ def test_update_simple():
     event.update_summary('A not so simple Event')
     event.update_description('Everything has changed')
     event.update_location('anywhere')
-    event.update_categories(['meeting'])
+    event.update_categories('meeting')
     assert normalize_component(event.raw) == normalize_component(event_updated.raw)
 
 
@@ -92,7 +92,7 @@ def test_remove_existing_description_if_set_to_empty():
 def test_update_remove_categories():
     event = Event.fromString(_get_text('event_dt_simple_updated'), **EVENT_KWARGS)
     event_nocat = Event.fromString(_get_text('event_dt_simple_nocat'), **EVENT_KWARGS)
-    event.update_categories([])
+    event.update_categories('    ')
     assert normalize_component(event.raw) == normalize_component(event_nocat.raw)
 
 
diff --git a/tests/khalendar_test.py b/tests/khalendar_test.py
index b671f56..48016f5 100644
--- a/tests/khalendar_test.py
+++ b/tests/khalendar_test.py
@@ -305,26 +305,26 @@ class TestCollection(object):
             '{start} {end} {title}', dt.date.today()) == '07.07. 08:30 07.07. 12:00 Arbeit\x1b[0m'
 
     def test_delete_two_events(self, coll_vdirs, sleep_time):
-        """testing if we can delete any of two events in two different
-        calendars with the same filename"""
-        coll, vdirs = coll_vdirs
-        event1 = Event.fromString(
-            _get_text('event_dt_simple'), calendar=cal1, locale=LOCALE_BERLIN)
-        event2 = Event.fromString(
-            _get_text('event_dt_simple'), calendar=cal2, locale=LOCALE_BERLIN)
-        coll.new(event1, cal1)
-        sleep(sleep_time)  # make sure the etags are different
-        coll.new(event2, cal2)
-        etag1 = list(vdirs[cal1].list())[0][1]
-        etag2 = list(vdirs[cal2].list())[0][1]
-        events = list(coll.get_localized(self.astart_berlin, self.aend_berlin))
-        assert len(events) == 2
-        assert events[0].calendar != events[1].calendar
-        for event in events:
-            if event.calendar == cal1:
-                assert event.etag == etag1
-            if event.calendar == cal2:
-                assert event.etag == etag2
+            """testing if we can delete any of two events in two different
+            calendars with the same filename"""
+            coll, vdirs = coll_vdirs
+            event1 = Event.fromString(
+                _get_text('event_dt_simple'), calendar=cal1, locale=LOCALE_BERLIN)
+            event2 = Event.fromString(
+                _get_text('event_dt_simple'), calendar=cal2, locale=LOCALE_BERLIN)
+            coll.new(event1, cal1)
+            sleep(sleep_time)  # make sure the etags are different
+            coll.new(event2, cal2)
+            etag1 = list(vdirs[cal1].list())[0][1]
+            etag2 = list(vdirs[cal2].list())[0][1]
+            events = list(coll.get_localized(self.astart_berlin, self.aend_berlin))
+            assert len(events) == 2
+            assert events[0].calendar != events[1].calendar
+            for event in events:
+                if event.calendar == cal1:
+                    assert event.etag == etag1
+                if event.calendar == cal2:
+                    assert event.etag == etag2
 
     def test_invalid_timezones(self, coll_vdirs):
         """testing if we can delete any of two events in two different
diff --git a/tests/parse_datetime_test.py b/tests/parse_datetime_test.py
index 741399b..7f21aee 100644
--- a/tests/parse_datetime_test.py
+++ b/tests/parse_datetime_test.py
@@ -191,11 +191,11 @@ class TestGuessTimedeltafstr:
 
     def test_garbage(self):
         with pytest.raises(ValueError):
-            guesstimedeltafstr('10mbar')
+                guesstimedeltafstr('10mbar')
 
     def test_moregarbage(self):
         with pytest.raises(ValueError):
-            guesstimedeltafstr('foo10m')
+                guesstimedeltafstr('foo10m')
 
     def test_same(self):
         assert dt.timedelta(minutes=20) == \
@@ -206,16 +206,16 @@ class TestGuessRangefstr:
 
     @freeze_time('2016-9-19')
     def test_today(self):
-        assert (dt.datetime(2016, 9, 19, 13), dt.datetime(2016, 9, 19, 14), False) == \
-            guessrangefstr('13:00 14:00', locale=LOCALE_BERLIN)
-        assert (dt.datetime(2016, 9, 19), dt.datetime(2016, 9, 21), True) == \
-            guessrangefstr('today tomorrow', LOCALE_BERLIN)
+            assert (dt.datetime(2016, 9, 19, 13), dt.datetime(2016, 9, 19, 14), False) == \
+                guessrangefstr('13:00 14:00', locale=LOCALE_BERLIN)
+            assert (dt.datetime(2016, 9, 19), dt.datetime(2016, 9, 21), True) == \
+                guessrangefstr('today tomorrow', LOCALE_BERLIN)
 
     @freeze_time('2016-9-19 16:34')
     def test_tomorrow(self):
         # XXX remove this funtionality, we shouldn't support this anyway
-        assert (dt.datetime(2016, 9, 19), dt.datetime(2016, 9, 21, 16), True) == \
-            guessrangefstr('today tomorrow 16:00', locale=LOCALE_BERLIN)
+            assert (dt.datetime(2016, 9, 19), dt.datetime(2016, 9, 21, 16), True) == \
+                guessrangefstr('today tomorrow 16:00', locale=LOCALE_BERLIN)
 
     @freeze_time('2016-9-19 13:34')
     def test_time_tomorrow(self):
@@ -554,6 +554,6 @@ def test_description_and_location_and_categories():
         event = _construct_event(data_list.split(),
                                  description='please describe the event',
                                  location='in the office',
-                                 categories=['boring meeting'],
+                                 categories='boring meeting',
                                  locale=LOCALE_BERLIN)
         assert _replace_uid(event).to_ical() == vevent
diff --git a/tests/settings_test.py b/tests/settings_test.py
index a45fcf0..037abac 100644
--- a/tests/settings_test.py
+++ b/tests/settings_test.py
@@ -225,70 +225,60 @@ def test_config_checks(metavdirs):
                 'path': '/cal3/home',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
             'my calendar': {
                 'color': 'dark blue',
                 'path': '/cal1/public',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
             'my private calendar': {
                 'color': '#FF00FF',
                 'path': '/cal1/private',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
             'public': {
                 'color': None,
                 'path': '/cal2/public',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
             'public1': {
                 'color': None,
                 'path': '/cal3/public',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
             'work': {
                 'color': None,
                 'path': '/cal3/work',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
             'cfgcolor': {
                 'color': 'dark blue',
                 'path': '/cal4/cfgcolor',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
             'dircolor': {
                 'color': 'dark blue',
                 'path': '/cal4/dircolor',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
             'cfgcolor_again': {
                 'color': 'dark blue',
                 'path': '/cal4/cfgcolor_again',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
             'cfgcolor_once_more': {
                 'color': 'dark blue',
                 'path': '/cal4/cfgcolor_once_more',
                 'readonly': False,
                 'type': 'calendar',
-                'priority': 10,
             },
 
         },