Files @ 4aa6a17afc49
Branch filter:

Location: kallithea/dev_requirements.txt

Thomas De Schampheleire
validators: don't catch all Exceptions as invalid clone URIs, be specific

When adding a new repository with a remote clone URI, the URI will be
validated in some way. Several exceptions could occur during that
validation.

Previously, the code would catch based on 'Exception', which means that
_any_ exception would cause the URI to be found invalid. This means that
errors in the code (e.g. related to Python 3 conversion) were also
categorized as 'invalid clone URI'. And thus, the tests that test an
actually invalid URI would pass, even though there was a bug.

Now, things have been refactored so it only is relevant to catch
InvalidCloneUriException. Any other exception will now yield a 500 Internal
Server Error, as expected.
1
2
3
4
5
6
7
8
9
pytest >= 4.6.6, < 5.4
pytest-sugar >= 0.9.2, < 0.10
pytest-benchmark >= 3.2.2, < 3.3
pytest-localserver >= 0.5.0, < 0.6
mock >= 3.0.0, < 4.1
Sphinx >= 1.8.0, < 2.4
WebTest >= 2.0.6, < 2.1
isort == 4.3.21
pyflakes == 2.1.1