tests.py fix

This commit is contained in:
ingvar1995 2016-10-23 00:43:18 +03:00
parent b807daa3ff
commit 3a90865fd0
3 changed files with 6 additions and 7 deletions

View File

@ -57,12 +57,10 @@ class TestFriend:
ProfileHelper('', 'test')
def create_friend(self, name, status_message, number, tox_id):
message_getter = None
friend = Friend(message_getter, number, name, status_message, ContactItem(), tox_id)
friend = Friend(None, number, name, status_message, None, tox_id)
return friend
def test_friend_creation(self):
app = QtGui.QApplication(sys.argv)
self.create_singletons()
name, status_message, number = 'Friend', 'I am friend!', 0
tox_id = '76518406F6A9F2217E8DC487CC783C25CC16A15EB36FF32E335A235342C48A39218F515C39A6'

View File

@ -22,9 +22,10 @@ class BaseContact:
"""
self._name, self._status_message = name, status_message
self._status, self._widget = None, widget
self._tox_id = tox_id
if self._widget is not None:
self._widget.name.setText(name)
self._widget.status_message.setText(status_message)
self._tox_id = tox_id
self.load_avatar()
# -----------------------------------------------------------------------------------------------------------------