Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
9850a9b86c92
Commit
f8a306b9
authored
Apr 12, 2019
by
Laurent Peuch
Browse files
DeprecationWarning: Please use assertRaisesRegex instead.
parent
eba09a2ac61d
Changes
1
Hide whitespace changes
Inline
Side-by-side
cubicweb/test/unittest_req.py
View file @
9850a9b8
...
...
@@ -101,17 +101,17 @@ class RequestCWTC(CubicWebTC):
users
=
list
(
rset
.
entities
())
self
.
assertEqual
(
len
(
users
),
2
)
with
self
.
assertRaisesRegex
p
(
with
self
.
assertRaisesRegex
(
KeyError
,
"^'chapeau not in CWUser subject relations'$"
):
req
.
find
(
'CWUser'
,
chapeau
=
u
"melon"
)
with
self
.
assertRaisesRegex
p
(
with
self
.
assertRaisesRegex
(
KeyError
,
"^'buddy not in CWUser object relations'$"
):
req
.
find
(
'CWUser'
,
reverse_buddy
=
users
[
0
])
with
self
.
assertRaisesRegex
p
(
with
self
.
assertRaisesRegex
(
NotImplementedError
,
'^in_group: list of values are not supported$'
):
req
.
find
(
'CWUser'
,
in_group
=
[
1
,
2
])
...
...
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