Path: blob/develop/tests/functional/ecr/test_get_login_password.py
2630 views
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.1#2# Licensed under the Apache License, Version 2.0 (the 'License'). You3# may not use this file except in compliance with the License. A copy of4# the License is located at5#6# http://aws.amazon.com/apache2.0/7#8# or in the 'license' file accompanying this file. This file is9# distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF10# ANY KIND, either express or implied. See the License for the specific11# language governing permissions and limitations under the License.1213from awscli.testutils import BaseAWSCommandParamsTest141516class TestGetLoginPasswordCommand(BaseAWSCommandParamsTest):17def setUp(self):18super(TestGetLoginPasswordCommand, self).setUp()19self.parsed_responses = [20{21'authorizationData': [22{23"authorizationToken": "Zm9vOmJhcg==",24"proxyEndpoint": "1235.ecr.us-east-1.io",25"expiresAt": "2015-10-16T00:00:00Z"26}27]28},29]3031def test_prints_login_password(self):32stdout = self.run_cmd("ecr get-login-password")[0]33self.assertIn('bar', stdout)34self.assertEqual(1, len(self.operations_called))353637