Path: blob/develop/tests/unit/customizations/codeartifact/__init__.py
2637 views
from awscli.testutils import unittest1from awscli.testutils import mock2from awscli.customizations.codeartifact import register_codeartifact_commands3from awscli.customizations.codeartifact import inject_commands4from awscli.customizations.codeartifact.login import CodeArtifactLogin567class TestRegisterCodeArtifactCommands(unittest.TestCase):8def test_register_codeartifact_commands(self):9event_emitter = mock.Mock()10register_codeartifact_commands(event_emitter)11event_emitter.register.assert_called_once_with(12'building-command-table.codeartifact', inject_commands13)141516class TestInjectCommands(unittest.TestCase):17def test_inject_commands(self):18command_table = {}19session = mock.Mock()20inject_commands(command_table, session)21self.assertIn('login', command_table)22self.assertIsInstance(23command_table['login'], CodeArtifactLogin24)252627