comparison wokkel/mam.py @ 8:a07bf3fb4b54

core (tests): test fixes
author Goffi <goffi@goffi.org>
date Thu, 23 Apr 2015 14:19:43 +0200
parents 1e21b4e94566
children 81f9b53ec7e4
comparison
equal deleted inserted replaced
7:1e21b4e94566 8:a07bf3fb4b54
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 = []