diff --git a/tests/pluginloadtest.cpp b/tests/pluginloadtest.cpp index 0453f6e62..a2a4bc87c 100644 --- a/tests/pluginloadtest.cpp +++ b/tests/pluginloadtest.cpp @@ -77,8 +77,10 @@ class PluginLoadTest : public QObject void testPlugins() { Device* d = nullptr; foreach(Device* id, mDaemon->devicesList()) { - if (id->isReachable()) + if (id->isReachable()) { + id->requestPair(); d = id; + } } QVERIFY(d); QVERIFY(d->isPaired()); diff --git a/tests/sendfiletest.cpp b/tests/sendfiletest.cpp index d9d6ab5c5..015818b36 100644 --- a/tests/sendfiletest.cpp +++ b/tests/sendfiletest.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -68,14 +69,18 @@ class TestSendFile : public QObject { Q_OBJECT public: - TestSendFile() : mDaemon(new TestDaemon) {} + TestSendFile() : mDaemon(new TestDaemon) { + QStandardPaths::setTestModeEnabled(true); + } private Q_SLOTS: void testSend() { Device* d = nullptr; foreach(Device* id, mDaemon->devicesList()) { - if (id->isReachable()) + if (id->isReachable()) { + id->requestPair(); d = id; + } } QVERIFY(d); QCOMPARE(d->isReachable(), true);