Media store data Service (#3955)
* Add delete container and list tags endpoints to MediaStore * Black reformat * Fixed Lint problems * Check if dictionary was deleted effectively * lint fix * MediaPackageClientError * Lint Fix * Test unknown channel describe * Concatenation Fix * MediaPackage - fix error message * MediaPackage ClientError part2 * Mediastoredata not working Base url tests and renaming typo List Items not returning proper JSON and wrongly hitting get_object response MediaStore2 Tests * More implementation * Fix tests and format * Comments fix * Comments 2 * MediastoreData - alternative logic to figure out appropriate host Co-authored-by: av <arcovoltaico@gmail.com> Co-authored-by: Bert Blommers <info@bertblommers.nl>
This commit is contained in:
parent
2590bf0e80
commit
759974d9cd
15 changed files with 328 additions and 5 deletions
|
|
@ -177,6 +177,18 @@ def test_describe_origin_endpoint_succeeds():
|
|||
)
|
||||
|
||||
|
||||
def test_describe_unknown_origin_endpoint_throws_error():
|
||||
client = boto3.client("mediapackage", region_name=region)
|
||||
channel_id = "unknown-channel"
|
||||
with pytest.raises(ClientError) as err:
|
||||
client.describe_origin_endpoint(Id=channel_id)
|
||||
err = err.value.response["Error"]
|
||||
err["Code"].should.equal("NotFoundException")
|
||||
err["Message"].should.equal(
|
||||
"originEndpoint with id={} not found".format(str(channel_id))
|
||||
)
|
||||
|
||||
|
||||
@mock_mediapackage
|
||||
def test_describe_unknown_origin_endpoint_throws_error():
|
||||
client = boto3.client("mediapackage", region_name=region)
|
||||
|
|
@ -207,6 +219,18 @@ def test_delete_origin_endpoint_succeeds():
|
|||
)
|
||||
|
||||
|
||||
def test_delete_unknown_origin_endpoint_throws_error():
|
||||
client = boto3.client("mediapackage", region_name=region)
|
||||
channel_id = "unknown-channel"
|
||||
with pytest.raises(ClientError) as err:
|
||||
client.delete_origin_endpoint(Id=channel_id)
|
||||
err = err.value.response["Error"]
|
||||
err["Code"].should.equal("NotFoundException")
|
||||
err["Message"].should.equal(
|
||||
"originEndpoint with id={} not found".format(str(channel_id))
|
||||
)
|
||||
|
||||
|
||||
@mock_mediapackage
|
||||
def test_delete_unknown_origin_endpoint_throws_error():
|
||||
client = boto3.client("mediapackage", region_name=region)
|
||||
|
|
@ -234,6 +258,22 @@ def test_update_origin_endpoint_succeeds():
|
|||
update_response["ManifestName"].should.equal("updated-manifest-name")
|
||||
|
||||
|
||||
def test_update_unknown_origin_endpoint_throws_error():
|
||||
client = boto3.client("mediapackage", region_name=region)
|
||||
channel_id = "unknown-channel"
|
||||
with pytest.raises(ClientError) as err:
|
||||
client.update_origin_endpoint(
|
||||
Id=channel_id,
|
||||
Description="updated-channel-description",
|
||||
ManifestName="updated-manifest-name",
|
||||
)
|
||||
err = err.value.response["Error"]
|
||||
err["Code"].should.equal("NotFoundException")
|
||||
err["Message"].should.equal(
|
||||
"originEndpoint with id={} not found".format(str(channel_id))
|
||||
)
|
||||
|
||||
|
||||
@mock_mediapackage
|
||||
def test_update_unknown_origin_endpoint_throws_error():
|
||||
client = boto3.client("mediapackage", region_name=region)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue