Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iPPIDB
ippidb-web
Commits
0c15a78b
Commit
0c15a78b
authored
Dec 08, 2020
by
Hervé MENAGER
Browse files
correct connection error handling syntax in tests
parent
ee986a29
Pipeline
#42981
passed with stages
in 21 minutes and 15 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ippisite/ippidb/tests/tests.py
View file @
0c15a78b
...
...
@@ -3,7 +3,7 @@ iPPI-DB unit tests
"""
import
json
import
re
import
requests.exceptions
.
SSLError
from
requests.exceptions
import
SSLError
from
django.contrib.auth
import
get_user_model
from
django.core.management
import
call_command
...
...
@@ -773,7 +773,7 @@ class TestConvertSMILESToIUPAC(TestCase):
self
.
assertEqual
(
convert_smiles_to_iupac
(
smiles
).
lower
(),
expected_iupac
.
lower
()
)
except
requests
.
exceptions
.
SSLError
:
except
SSLError
:
self
.
skipTest
(
"SSL connection issue with the CACTUS WS, skipping"
)
...
...
ippisite/ippidb/tests/tests_contribute.py
View file @
0c15a78b
"""
iPPI-DB contribution module tests
"""
import
requests.exceptions
.
HTTPError
from
requests.exceptions
import
HTTPError
from
django.contrib.auth
import
get_user_model
from
django.contrib.auth.models
import
Permission
...
...
@@ -26,7 +26,7 @@ class BibliographyIDTestCase(TestCase):
b
.
id_source
=
"10.1016/j.bmcl.2013.03.013"
try
:
b
.
save
(
autofill
=
True
)
except
requests
.
exceptions
.
HTTPError
:
except
HTTPError
:
self
.
skipTest
(
"Connection error, skipping test"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment