FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
aws-cli/tests/functional/test_streaming_output.py at develop · lovejavaee/aws-cli · GitHub
lovejavaee
/
aws-cli
Public
forked from
aws/aws-cli
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
aws-cli
/
tests
/
functional
/
test_streaming_output.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (40 loc) · 1.64 KB
Breadcrumbs
aws-cli
/
tests
/
functional
/
test_streaming_output.py
Copy path
File metadata and controls
45 lines (40 loc) · 1.64 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
# Copyright 2012-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from
awscli
.
compat
import
six
from
awscli
.
testutils
import
BaseAWSCommandParamsTest
from
awscli
.
testutils
import
FileCreator
class
TestStreamingOutput
(
BaseAWSCommandParamsTest
):
def
setUp
(
self
):
super
(
TestStreamingOutput
,
self
).
setUp
()
self
.
files
=
FileCreator
()
def
tearDown
(
self
):
super
(
TestStreamingOutput
,
self
).
tearDown
()
self
.
files
.
remove_all
()
def
test_get_media_streaming_output
(
self
):
cmdline
=
(
'kinesis-video-media get-media --stream-name test-stream '
'--start-selector StartSelectorType=EARLIEST %s'
)
self
.
parsed_response
=
{
'ContentType'
:
'video/webm'
,
'Payload'
:
six
.
BytesIO
(
b'testbody'
)
}
outpath
=
self
.
files
.
full_path
(
'outfile'
)
params
=
{
'StartSelector'
: {
'StartSelectorType'
:
'EARLIEST'
},
'StreamName'
:
'test-stream'
}
self
.
assert_params_for_cmd
(
cmdline
%
outpath
,
params
)
with
open
(
outpath
,
'rb'
)
as
outfile
:
self
.
assertEqual
(
outfile
.
read
(),
b'testbody'
)
Back
|
FazBrowse Home
|
New Git URL