Account test suite implementation
darcs-hash:20061123180515-86b55-fd6db5bd3cba07f2a3d5987d4c92c07f7ec32c5e.gz
This commit is contained in:
@@ -644,7 +644,7 @@ class JCLComponent(Component, object):
|
||||
reg_form.fields["name"].value = _account.name
|
||||
reg_form.fields["name"].type = "hidden"
|
||||
for (field_name, field) in reg_form.fields.items():
|
||||
if hasattr(self.account_class, field_name):
|
||||
if hasattr(_account, field_name):
|
||||
field.value = str(getattr(_account, field_name))
|
||||
return reg_form
|
||||
|
||||
|
||||
@@ -100,12 +100,12 @@ class Account(SQLObject):
|
||||
def set_status(self, status):
|
||||
"""Set current Jabber status"""
|
||||
if status == OFFLINE:
|
||||
if hasattr(self.__class__, 'waiting_password_reply') \
|
||||
and hasattr(self.__class__, 'store_password') \
|
||||
and hasattr(self.__class__, 'password'):
|
||||
setattr(self.__class__, 'waiting_password_reply', False)
|
||||
if not getattr(self.__class__, 'store_password'):
|
||||
setattr(self.__class__, 'password', None)
|
||||
if hasattr(self, 'waiting_password_reply') \
|
||||
and hasattr(self, 'store_password') \
|
||||
and hasattr(self, 'password'):
|
||||
setattr(self, 'waiting_password_reply', False)
|
||||
if not getattr(self, 'store_password'):
|
||||
setattr(self, 'password', None)
|
||||
else:
|
||||
# TODO seems to be a bug : first_check = True only
|
||||
# if previous status was OFFLINE
|
||||
|
||||
Reference in New Issue
Block a user