Skip to content

Commit bbcab5f

Browse files
committed
change plugin coupling protocol from "filesystem" to other values by environment variable - as config files are not parsed in most test cases
1 parent 16671ca commit bbcab5f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

qiita_client/testing.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from time import sleep
1212

1313
from qiita_client import QiitaClient
14+
from plugin import BaseQiitaPlugin
1415

1516
import logging
1617

@@ -36,6 +37,14 @@ def setUpClass(cls):
3637
logger.debug(
3738
'PluginTestCase.setUpClass() token %s' % cls.qclient._token)
3839
cls.qclient.post('/apitest/reload_plugins/')
40+
41+
# When testing, we access plugin functions often directly. Plugin
42+
# configuration files are not parsed in these cases. To be able to
43+
# change the plugin coupling protocol, we resort to the environment
44+
# variable here.
45+
cls.qclient._plugincoupling = environ.get(
46+
'QIITA_PLUGINCOUPLING', BaseQiitaPlugin._DEFAULT_PLUGIN_COUPLINGS)
47+
3948
# Give enough time for the plugins to register
4049
sleep(5)
4150

0 commit comments

Comments
 (0)