Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorYann Leboulanger <yann@leboulanger.org>2017-09-15 16:11:55 +0300
committerYann Leboulanger <yann@leboulanger.org>2017-09-15 16:11:55 +0300
commit5c0538a202d3750686bd50d8d66c84637c28ec3b (patch)
treeda327d852bafbd23279885935e62383463c97c77 /test/lib
parentef75e93c707609997d757d96ad79db0bfdc96ea3 (diff)
Fix running make test
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/__init__.py4
-rw-r--r--test/lib/gajim_mocks.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/test/lib/__init__.py b/test/lib/__init__.py
index 9c10673c6..b8c60c8fe 100644
--- a/test/lib/__init__.py
+++ b/test/lib/__init__.py
@@ -26,6 +26,8 @@ pluginsconfigdir = configdir + '/pluginsconfig'
import builtins
builtins._ = lambda x: x
+from gajim.common.contacts import LegacyContactsAPI
+
def setup_env():
# wipe config directory
if os.path.isdir(configdir):
@@ -46,6 +48,8 @@ def setup_env():
app.DATA_DIR = gajim_root + '/data'
app.use_x = use_x
+ app.contacts = LegacyContactsAPI()
+ app.connections = {}
if use_x:
from gajim import gtkgui_helpers
diff --git a/test/lib/gajim_mocks.py b/test/lib/gajim_mocks.py
index dd528cfc7..812aac724 100644
--- a/test/lib/gajim_mocks.py
+++ b/test/lib/gajim_mocks.py
@@ -107,7 +107,7 @@ class MockInterface(Mock):
self.msg_win_mgr = Mock()
self.roster = Mock()
app.ged = ged.GlobalEventsDispatcher()
- import plugins
+ from gajim import plugins
app.plugin_manager = plugins.PluginManager()
self.remote_ctrl = None
@@ -119,7 +119,7 @@ class MockInterface(Mock):
self.jabber_state_images = {'16': {}, '24': {}, '32': {},
'opened': {}, 'closed': {}}
- import gtkgui_helpers
+ from gajim import gtkgui_helpers
gtkgui_helpers.make_jabber_state_images()
else:
self.jabber_state_images = {'16': Mock(), '24': Mock(),