Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
d1691a8ef950
Commit
394b919a
authored
May 26, 2021
by
Laurent Peuch
Browse files
style: remove unused assigned variables
parent
3ebdaf0b2cbd
Pipeline
#59073
passed with stage
in 9 minutes and 23 seconds
Changes
1
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
cubicweb/web/test/unittest_views_basecontrollers.py
View file @
d1691a8e
...
...
@@ -1045,7 +1045,7 @@ class UndoControllerTC(CubicWebTC):
req
.
form
[
'txuuid'
]
=
txuuid
controller
=
self
.
vreg
[
'controllers'
].
select
(
'undo'
,
req
)
with
self
.
assertRaises
(
tx
.
NoSuchTransaction
)
as
cm
:
result
=
controller
.
publish
(
rset
=
None
)
controller
.
publish
(
rset
=
None
)
self
.
assertEqual
(
cm
.
exception
.
txuuid
,
txuuid
)
def
assertURLPath
(
self
,
url
,
expected_path
,
expected_params
=
None
):
...
...
@@ -1055,9 +1055,9 @@ class UndoControllerTC(CubicWebTC):
"""
with
self
.
admin_access
.
web_request
()
as
req
:
scheme
,
netloc
,
path
,
query
,
fragment
=
urlsplit
(
url
)
query_dict
=
parse_qs
(
query
)
parse_qs
(
query
)
expected_url
=
urljoin
(
req
.
base_url
(),
expected_path
)
self
.
assertEqual
(
urlunsplit
((
scheme
,
netloc
,
path
,
None
,
None
)),
expected_url
)
self
.
assertEqual
(
urlunsplit
((
scheme
,
netloc
,
path
,
None
,
None
)),
expected_url
)
def
test_redirect_redirectpath
(
self
):
"Check that the potential __redirectpath is honored"
...
...
@@ -1068,7 +1068,7 @@ class UndoControllerTC(CubicWebTC):
req
.
form
[
'__redirectpath'
]
=
rpath
controller
=
self
.
vreg
[
'controllers'
].
select
(
'undo'
,
req
)
with
self
.
assertRaises
(
Redirect
)
as
cm
:
result
=
controller
.
publish
(
rset
=
None
)
controller
.
publish
(
rset
=
None
)
self
.
assertURLPath
(
cm
.
exception
.
location
,
rpath
)
...
...
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