Fix error message for missing log stream (#4043)

This commit is contained in:
Brian Pandola 2021-06-28 22:06:14 -07:00 committed by GitHub
commit 315c357cd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -46,12 +46,15 @@ def test_exceptions():
logEvents=[{"timestamp": 0, "message": "line"}],
)
with pytest.raises(ClientError):
with pytest.raises(ClientError) as ex:
conn.put_log_events(
logGroupName=log_group_name,
logStreamName="invalid-stream",
logEvents=[{"timestamp": 0, "message": "line"}],
)
error = ex.value.response["Error"]
error["Code"].should.equal("ResourceNotFoundException")
error["Message"].should.equal("The specified log stream does not exist.")
@mock_logs