Skip to content

Commit 270b1bc

Browse files
author
Balaji Veeramani
committed
Move BytesDeserializer test
1 parent d38f803 commit 270b1bc

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
from __future__ import absolute_import
14+
15+
import io
16+
17+
from sagemaker.deserializers import BytesDeserializer
18+
19+
20+
def test_bytes_deserializer():
21+
deserializer = BytesDeserializer()
22+
23+
result = deserializer.deserialize(io.BytesIO(b"[1, 2, 3]"), "application/json")
24+
25+
assert result == b"[1, 2, 3]"

0 commit comments

Comments
 (0)