Commit Graph

65 Commits

Author SHA1 Message Date
Calum Lind cc1807cf97 Fix travis docs failing with Sphinx 1.8.0
Sphinx pinned to 1.7

See sphinx-doc/sphinx#5417
2018-09-14 16:09:20 +01:00
Calum Lind 63b7f6d382 [Tests] Add pytest-twisted to tox deps 2018-09-14 16:06:06 +01:00
DjLegolas b9a9e06c1d [WebUI][Daemon] Enhance TLS Security
This applies the following for both WebUI and Daemon:
1. Raised minimal TLS version to TLSv1.2
2. Added specific cipher suite list
3. Added support for ECDSA auth keys
4. Added support for ECDHE key exchange algorithm

We disabled the ability to perform TLS/SSL renegotiation and therefore
will prevent the clients from renegotiating, which can be exploit for
DoS attacks.

New security tests now will be skipped when running `pydef` and `trial`
testenvs. To run the test, use the testenv `security` or add the environment
variable `SECURITY_TESTS` before running the tests. Also should only run when
adding to the commit message the string `SECURITY_TEST`.
2018-09-06 19:14:13 +01:00
Calum Lind 3fc97672de Fix the docs run failing on Travis
Likely that the deprecation warning from cryptography is causing the
setup.py sphinx build command to return an error so the tox/travis job
is marked as failing. Changing to calling the sphinx-build command
directly solves this.

Also updated the sphinx config for built-in napoleon and faster builds
using jobs option.
2018-07-28 10:26:02 +01:00
Unknown edd431a304 Make Tox Multi-OS Friendly 2018-06-02 11:29:51 +01:00
Calum Lind d642fa3989 Fix files to pass new Flake8 checkers
Some new flake8 checkers were added so fix these new warnings and
any issues uncovered.

Use add-trailing-comma to fix missing trailing commas. It does not
format it as well as I would like however it was fast to change and
helps with git changes in future.

Removed pylint from tox due to large number of warnings.
2018-06-01 23:41:17 +01:00
Calum Lind 8439698336 [Tox] Use platform independant toxworkdir instead of PWD
The use of `{env:PWD}` is not available on Windows so switch to
`{toxworkdir}` which is the directory where virtual environments
are created and sub directories for packaging reside.
2018-05-20 08:46:40 +01:00
Calum Lind 4982ba0b98 Cleanup pytest config in tox
Config values are either wrong, unused or default is better.

Disable logging of deluge log output in testing.

Newer versions of pytest now use `pytest` cmd so rename.
2017-12-17 11:55:09 +00:00
Calum Lind 4e79ed8124 Fix tox config to install latest pip packages
Trial changed command in latest versions of twisted
2017-12-16 17:39:48 +00:00
Calum Lind c72459d3ef Replace pep8 with pycodestyle in tox.ini 2017-06-07 11:08:50 +01:00
Calum Lind 5c1faf3d5e [Tests] Unpin isort as 4.2.13 contains fixes 2017-06-07 10:31:09 +01:00
Calum Lind ede0f710f8 [Core] Replace usage of deprecated new.classobj
* type is new module to use
2017-06-05 09:03:34 +01:00
Calum Lind 66718f6d8e [Docs] Remove chardet mock to fix requests version check
* chardet is an easily installed pure python module so doesn't need mocking.
2017-06-05 08:10:13 +01:00
Calum Lind 78dc75d55d [Tests] Specify module versions to fix tox tests 2017-06-05 00:01:07 +01:00
Calum Lind 4a274466ac Add python 3 section to tox 2017-03-16 23:20:56 +00:00
Calum Lind df4d97c447 [Tox] Twisted version pin to 16.6
* There is a problem with Twisted 17 and the setup for travis and tox
   using site-packages with an old openssh package.

       AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'

 * The simplest workaround for now is to pin Twisted to 16.6.
2017-02-14 18:59:34 +00:00
Calum Lind b71a2fa549 [Tox] Remove py26 and add lt version output to trial 2017-01-26 12:49:55 +00:00
Calum Lind 7468078b71 [Setup] Add a CleanDocs class 2016-11-28 12:58:34 +00:00
Calum Lind 874249655d [Tests] Replace isort test with flake8-isort
* Move the known_third_party back to setup.cfg with comments.
2016-11-25 12:43:50 +00:00
bendikro 0edebda1c7 [WebUI] Log correct http address if listening on IPv6 2016-11-22 22:07:03 +00:00
Calum Lind af6b277d28 [Lint] Add flake8-quotes to tox and fix bad quotes 2016-11-04 00:10:23 +00:00
bendikro 54685226c4 [Tests] Remove redundant pillow dep from tox 2016-11-03 10:45:01 +00:00
bendikro 61b059f015 [Lint] Fix couple of pylint complaints 2016-11-03 10:45:01 +00:00
Calum Lind 5c7a4549f7 [Tests] Add pillow dep so pylint parses Win32IconImagePlugin 2016-11-03 10:45:00 +00:00
bendikro 2f4cb0156c [Tests] Fix for isort config package handling
* Force gtk modules to be third_party for tox/travis testing.
2016-11-01 14:04:14 +00:00
bendikro 1e183a3258 [UI] Add gettext.ngettext to __builtin__.__dict__
Handle plurality with getttext using ngettext. Added to
__builtin__.__dict__ as _n
2016-10-30 12:45:02 +00:00
bendikro 75714b60ca [Docs] Clean module sources dir before generating docs
If old and outdated sources are present in docs/sources/modules,
python setup.py build_docs will fail to generate docs.
2016-10-21 10:36:24 +01:00
Calum Lind 3a8ed2e9cb [Core] Change deprecated lt.version to lt.__version__ 2016-10-17 12:40:28 +01:00
Calum Lind db1b427b3f [Tests] Fix flake8 v3 searching .tox dir 2016-10-10 18:46:09 +01:00
Calum Lind 7e229ceb2f [Tests] Combine echo lines into python cmd for tox docs 2016-05-25 11:06:48 +01:00
bendikro 7c07001bdc [Docs] Make tox -e docs fail on sphinx warnings
* Also cleanup isort command
2016-05-24 23:53:37 +01:00
bendikro c204b63653 [Docs] Make tox -e docs fail on sphinx warnings
* Also cleanup isort command
2016-05-24 21:10:53 +02:00
Calum Lind 717ceee0ea [Tests] Update comments in tox.ini 2016-05-22 12:43:07 +01:00
bendikro b6b1d40516 [Tox] [Travis] Fixes to test config 2016-05-22 12:11:41 +01:00
bendikro fd9e68e7e7 [Tests] Place logfiles from py.test run in _pytest_temp 2016-05-19 22:20:28 +01:00
bendikro 6ce9f77e17 [WebUI] Handle missing script files and fallback to available files
* To help user's encountering a blank web page, log warnings if script
files for a selected mode are missing and attempt to fallback to a working mode.
 * There is no logging for dev version detection to prevent spamming output.
 * Add slimit dependency to tox
2016-05-19 15:24:37 +01:00
Calum Lind 983ee7b973 [Tests] Raise minimum isort version to 4.2.5
The use of 'isort:imports-firstparty' in gtkui.py requires version >=4.2.5
2016-05-18 10:03:06 +01:00
Calum Lind 1a62e00066 [Lint] Add Plugins and scripts to tox pylint 2016-05-09 20:10:51 +01:00
Calum Lind 3ed4c8d636 [Lint] Add pylint to tox run 2016-04-29 23:23:18 +01:00
bendikro 2dea6ab5a5 [Tests] Add pylint target to tox 2016-04-19 22:14:28 +02:00
bendikro c3247396f7 [Stats] Fix to tests and deleted .test.py 2016-04-19 19:00:07 +02:00
bendikro 70d8b65f0a [WebUi] [Core] Fixes to plugin handling and WebUi plugin + tests
This should fix problems with errors occuring when failing to
enable plugins. Errors in plugin handling are handled better
and properly logged.

WebUI plugin in particular had issues when being enabled and disabled
multiple times because it was trying to create DelugeWeb component
each time it was enabled. If deluge-web is already listening on
the same port, enabling the WebUI plugin will fail, and the checkbox
will not be checked.

There are still some issues when enabling/disabling plugins by
clicking fast multiple times on the checkbox.
2016-04-18 15:49:30 +01:00
bendikro d58960d723 [Tests] [Web] Make JSON independent of Web component
* Implement JSONTestCase in test_json_api.py
* Implement WebAPITestCase test case in test_web_api.py
2016-04-10 00:10:53 +02:00
Calum Lind 0b17b52c9a [Tests] Consistent tox config layout 2016-04-07 19:11:32 +01:00
bendikro 9d13234e23 [Tests] Fix for flake8 in tox
Force install flake8 in tox to avoid the system flake8 being used if
available.

Remove unneeded whitelist entries
2016-04-07 18:44:20 +01:00
Calum Lind ebc00f3d7c Fix config for isort 4.2 2015-10-21 01:17:08 +01:00
Calum Lind 32bc20d8ce Fix pep8 across codebase
* Further whitespace fixes by autopep8
 * Using pep8 v1.6.2 (not currently used by pyflakes)
 * Update config for pep8 and flake8 in tox.ini
   * A separate pep8 entry for running autopep8. The ignores prevent
     blank lines being added after docstrings.
   * .tox and E133 are ignored in flake8 by default.
2015-10-21 00:06:27 +01:00
bendikro da1c07ff99 [Tests] Fixes to make tests pass
* Fix GTKUI column types mismatch (broken by 239e679)
* Updated deluge/tests/google.ico
* Remove empty line in torrentmanager.py
2015-09-02 17:14:13 +02:00
Calum Lind a4844f7b77 [win32] Update packaging scripts
* Update directory paths.
2015-08-24 14:56:53 +01:00
bendikro 9d662bf059 [Tests] Fix code for isort 4.0.0 2015-08-14 16:45:23 +01:00