Path: blob/develop/tests/functional/ecr_public/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"authorizationToken": "Zm9vOmJhcg==",23"expiresAt": "2015-10-16T00:00:00Z"24}25},26]2728def test_prints_login_password(self):29stdout = self.run_cmd("ecr-public get-login-password")[0]30self.assertIn('bar', stdout)31self.assertEqual(1, len(self.operations_called))323334