Mercurial > libervia-backend
comparison src/tmp/wokkel/mam.py @ 1424:2d8fccec84e8
core (tests): test fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 23 Apr 2015 14:19:43 +0200 |
parents | 882e5fabf68c |
children | f525c272fd6d |
comparison
equal
deleted
inserted
replaced
1423:882e5fabf68c | 1424:2d8fccec84e8 |
---|---|
1 # -*- coding: utf-8 -*- | |
1 # -*- test-case-name: wokkel.test.test_mam -*- | 2 # -*- test-case-name: wokkel.test.test_mam -*- |
2 # | 3 # |
3 # SàT Wokkel extension for Message Archive Management (XEP-0313) | 4 # SàT Wokkel extension for Message Archive Management (XEP-0313) |
4 # Copyright (C) 2015 Adien Cossa (souliane@mailoo.org) | 5 # Copyright (C) 2015 Adien Cossa (souliane@mailoo.org) |
5 | 6 |
155 | 156 |
156 @param never (list): A list of JID instances. | 157 @param never (list): A list of JID instances. |
157 @type never: C{list} | 158 @type never: C{list} |
158 """ | 159 """ |
159 | 160 |
160 def __init__(self, default, always=None, never=None): | 161 def __init__(self, default=None, always=None, never=None): |
161 assert default in ('always', 'never', 'roster') | 162 if default is not None: |
163 assert default in ('always', 'never', 'roster') | |
162 self.default = default | 164 self.default = default |
163 if always is not None: | 165 if always is not None: |
164 assert isinstance(always, list) | 166 assert isinstance(always, list) |
165 else: | 167 else: |
166 always = [] | 168 always = [] |