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
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
caucase
Commits
35919046
Commit
35919046
authored
Jul 07, 2022
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caucase.{wsgi,test}: Declare functions instead of lambda-in-local
Silences pylint warnings.
parent
1c2e95f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
20 deletions
+23
-20
caucase/test.py
caucase/test.py
+11
-9
caucase/wsgi.py
caucase/wsgi.py
+12
-11
No files found.
caucase/test.py
View file @
35919046
...
@@ -1654,15 +1654,17 @@ class CaucaseTest(TestCase):
...
@@ -1654,15 +1654,17 @@ class CaucaseTest(TestCase):
]
]
cau_crt
,
=
cau_ca_list
cau_crt
,
=
cau_ca_list
caucase_url
=
self
.
_caucase_url
+
'/cau'
caucase_url
=
self
.
_caucase_url
+
'/cau'
updateCAFile
=
lambda
:
CaucaseClient
.
updateCAFile
(
def
updateCAFile
():
url
=
caucase_url
,
return
CaucaseClient
.
updateCAFile
(
ca_crt_path
=
self
.
_client_user_ca_crt
,
url
=
caucase_url
,
)
ca_crt_path
=
self
.
_client_user_ca_crt
,
updateCRLFile
=
lambda
:
CaucaseClient
.
updateCRLFile
(
)
url
=
caucase_url
,
def
updateCRLFile
():
crl_path
=
self
.
_client_user_crl
,
return
CaucaseClient
.
updateCRLFile
(
ca_list
=
cau_ca_list
,
url
=
caucase_url
,
)
crl_path
=
self
.
_client_user_crl
,
ca_list
=
cau_ca_list
,
)
self
.
_runClient
(
'--update-user'
)
self
.
_runClient
(
'--update-user'
)
# CA & CRL were freshly updated, they should not need any update
# CA & CRL were freshly updated, they should not need any update
self
.
assertFalse
(
updateCAFile
())
self
.
assertFalse
(
updateCAFile
())
...
...
caucase/wsgi.py
View file @
35919046
...
@@ -495,17 +495,18 @@ class Application(object):
...
@@ -495,17 +495,18 @@ class Application(object):
},
},
},
},
}
}
getHALMethodDict
=
lambda
name
,
title
:
{
def
getHALMethodDict
(
name
,
title
):
'GET'
:
{
return
{
'do'
:
self
.
getHAL
,
'GET'
:
{
'context_is_routing'
:
True
,
'do'
:
self
.
getHAL
,
'cors'
:
CORS_POLICY_ALWAYS_ALLOW
,
'context_is_routing'
:
True
,
'descriptor'
:
[{
'cors'
:
CORS_POLICY_ALWAYS_ALLOW
,
'name'
:
name
,
'descriptor'
:
[{
'title'
:
title
,
'name'
:
name
,
}],
'title'
:
title
,
},
}],
}
},
}
self
.
_root_dict
=
{
self
.
_root_dict
=
{
'method'
:
{
'method'
:
{
'GET'
:
{
'GET'
:
{
...
...
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