menu update, test update

This commit is contained in:
ingvar1995 2016-02-25 15:11:14 +03:00
parent 98aa10b7e0
commit 4957d7ce09
2 changed files with 11 additions and 3 deletions

View file

@ -1,5 +1,6 @@
from PySide import QtCore, QtGui
from settings import Settings
from util import bin_to_string
class AddContact(QtGui.QWidget):
@ -102,8 +103,7 @@ class ProfileSettings(QtGui.QWidget):
font.setBold(True)
self.tox_id.setFont(font)
self.tox_id.setObjectName("tox_id")
# TODO: copy TOX ID to self.tox_id
s = 'ID'
s = bin_to_string(self.tox.self_get_address().value)
self.tox_id.setText(s)
self.copyId = QtGui.QPushButton(self)
self.copyId.setGeometry(QtCore.QRect(40, 250, 98, 31))
@ -133,7 +133,7 @@ class ProfileSettings(QtGui.QWidget):
def copy(self):
clipboard = QtGui.QApplication.clipboard()
id = unicode(self.tox.self_get_public_key())
id = bin_to_string(self.tox.self_get_address().value)
clipboard.setText(id)

View file

@ -66,3 +66,11 @@ class TestTox():
for data in node_generator():
tox.bootstrap(*data)
del tox
def test_friend_list(self):
data = Profile.open_profile(Settings.get_default_path(), 'tox_save')
settings = Settings.get_default_settings()
tox = tox_factory(data, settings)
s = tox.self_get_friend_list()
assert s
del tox