Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caucase
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
caucase
Commits
40a89260
Commit
40a89260
authored
Nov 05, 2018
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: Make pylint happier.
parent
6c612e22
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
.pylintrc
.pylintrc
+5
-0
caucase/test.py
caucase/test.py
+12
-1
caucase/wsgi.py
caucase/wsgi.py
+2
-0
No files found.
.pylintrc
View file @
40a89260
[MASTER]
ignore=_version.py
[DESIGN]
max-args=12
max-nested-blocks=6
max-module-lines=1500
[MESSAGES CONTROL]
disable=C0103,C0330,R0903,R0914,R0912,R0915,R0902
# C0103 "Invalid name "%s" (should match %s)"
...
...
caucase/test.py
View file @
40a89260
...
...
@@ -20,6 +20,7 @@ Caucase - Certificate Authority for Users, Certificate Authority for SErvices
Test suite
"""
# pylint: disable=too-many-lines
from
__future__
import
absolute_import
from
Cookie
import
SimpleCookie
import
datetime
...
...
@@ -148,8 +149,13 @@ class FakeStreamRequest(object):
"""
return
self
.
_rfile
if
'r'
in
mode
else
self
.
_wfile
# pylint: disable=unused-argument
def
sendall
(
self
,
data
,
flags
=
None
):
# pragma: no cover
"""
Redirect sendall.
"""
self
.
_wfile
.
write
(
data
)
# pylint: enable=unused-argument
class
NoCloseFileProxy
(
object
):
"""
...
...
@@ -1329,6 +1335,9 @@ class CaucaseTest(unittest.TestCase):
))
server_key_file
.
write
(
ca_crt_pem
)
def
readServerKey
():
"""
Read server key from file.
"""
with
open
(
self
.
_server_key
,
'rb'
)
as
server_key_file
:
return
server_key_file
.
read
()
reference_server_key
=
readServerKey
()
...
...
@@ -2570,7 +2579,7 @@ class CaucaseTest(unittest.TestCase):
netloc
=
'[::1]'
port
=
urlparse
.
urlparse
(
self
.
_caucase_url
).
port
if
port
:
netloc
+=
':%s'
%
port
netloc
+=
':%s'
%
port
self
.
_server_netloc
=
netloc
self
.
_caucase_url
=
'http://'
+
netloc
self
.
_startServer
()
...
...
@@ -2602,10 +2611,12 @@ class CaucaseTest(unittest.TestCase):
self
.
assertEqual
(
os
.
stat
(
self
.
_server_db
).
st_mode
&
0o777
,
0o600
)
self
.
assertEqual
(
os
.
stat
(
self
.
_server_key
).
st_mode
&
0o777
,
0o600
)
# pylint: disable=no-member
if
getattr
(
CaucaseTest
,
'assertItemsEqual'
,
None
)
is
None
:
# Because python3 decided it should be named differently, and 2to3 cannot
# pick it up, and this code must remain python2-compatible... Yay !
CaucaseTest
.
assertItemsEqual
=
CaucaseTest
.
assertCountEqual
# pylint: enable=no-member
if
__name__
==
'__main__'
:
# pragma: no cover
unittest
.
main
()
caucase/wsgi.py
View file @
40a89260
...
...
@@ -34,10 +34,12 @@ import jwt
from
.
import
utils
from
.
import
exceptions
# pylint: disable=import-error
if
sys
.
version_info
>=
(
3
,
):
# pragma: no cover
from
html
import
escape
else
:
# pragma: no cover
from
cgi
import
escape
# pylint: enable=import-error
__all__
=
(
'Application'
,
'CORSTokenManager'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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