diff options
Diffstat (limited to 'deluge/plugins/Stats')
-rwxr-xr-x | deluge/plugins/Stats/create_dev_link.sh | 11 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/tests/test_stats.py | 5 | ||||
-rw-r--r-- | deluge/plugins/Stats/deluge_stats/webui.py | 1 |
3 files changed, 12 insertions, 5 deletions
diff --git a/deluge/plugins/Stats/create_dev_link.sh b/deluge/plugins/Stats/create_dev_link.sh new file mode 100755 index 0000000..5e04057 --- /dev/null +++ b/deluge/plugins/Stats/create_dev_link.sh @@ -0,0 +1,11 @@ +#!/bin/bash +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir "$CONFIG_DIR" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp diff --git a/deluge/plugins/Stats/deluge_stats/tests/test_stats.py b/deluge/plugins/Stats/deluge_stats/tests/test_stats.py index 9c66ee1..4aefc50 100644 --- a/deluge/plugins/Stats/deluge_stats/tests/test_stats.py +++ b/deluge/plugins/Stats/deluge_stats/tests/test_stats.py @@ -7,7 +7,6 @@ import pytest import pytest_twisted from twisted.internet import defer -import deluge.component as component from deluge.common import fsize, fspeed from deluge.ui.client import client @@ -21,17 +20,15 @@ def print_totals(totals): print('down:', fsize(totals['total_download'] - totals['total_payload_download'])) -@pytest.mark.usefixtures('component') class TestStatsPlugin: @pytest_twisted.async_yield_fixture(autouse=True) - async def set_up(self): + async def set_up(self, component): defer.setDebugging(True) client.start_standalone() client.core.enable_plugin('Stats') await component.start() yield client.stop_standalone() - await component.shutdown() @defer.inlineCallbacks def test_client_totals(self): diff --git a/deluge/plugins/Stats/deluge_stats/webui.py b/deluge/plugins/Stats/deluge_stats/webui.py index f38daeb..2c2ed46 100644 --- a/deluge/plugins/Stats/deluge_stats/webui.py +++ b/deluge/plugins/Stats/deluge_stats/webui.py @@ -20,7 +20,6 @@ log = logging.getLogger(__name__) class WebUI(WebPluginBase): - scripts = [get_resource('stats.js')] # The enable and disable methods are not scrictly required on the WebUI |