Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenStack
oslo
python-oslo.serialization
Commits
c21a3110
Commit
c21a3110
authored
Apr 16, 2021
by
Zuul
Committed by
Gerrit Code Review
Apr 16, 2021
Browse files
Merge "Drop use of deprecated collections classes"
parents
96409d6e
967a36fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
oslo_serialization/tests/test_jsonutils.py
View file @
c21a3110
...
...
@@ -14,6 +14,7 @@
# under the License.
import
collections
import
collections.abc
import
datetime
import
functools
import
io
...
...
@@ -241,9 +242,9 @@ class ToPrimitiveTestCase(test_base.BaseTestCase):
self
.
assertEqual
({
'iteritems'
:
'iteritems'
},
p
)
def
test_mapping
(
self
):
# Make sure collections.Mapping is converted to a dict
# Make sure collections.
abc.
Mapping is converted to a dict
# and not a list.
class
MappingClass
(
collections
.
Mapping
):
class
MappingClass
(
collections
.
abc
.
Mapping
):
def
__init__
(
self
):
self
.
data
=
dict
(
a
=
1
,
b
=
2
,
c
=
3
)
...
...
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