-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
{Spring} Extract get_test_cmd (#7494)
- Loading branch information
Showing
14 changed files
with
134 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# ----------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# ----------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# ----------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# ----------------------------------------------------------------------------- | ||
|
||
from azure.cli.core import AzCommandsLoader | ||
from azure.cli.core.commands import AzCliCommand | ||
from azure.cli.core.mock import DummyCli | ||
|
||
try: | ||
import unittest.mock as mock | ||
except ImportError: | ||
from unittest import mock | ||
|
||
|
||
def get_test_cmd(): | ||
cli_ctx = DummyCli() | ||
cli_ctx.data['subscription_id'] = '00000000-0000-0000-0000-000000000000' | ||
loader = AzCommandsLoader(cli_ctx, resource_type='Microsoft.AppPlatform') | ||
cmd = AzCliCommand(loader, 'test', None) | ||
cmd.command_kwargs = {'resource_type': 'Microsoft.AppPlatform'} | ||
cmd.cli_ctx = cli_ctx | ||
return cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.