You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
az feedback auto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
When running CLI tests using azure-cli-testsdk framework and the latest version of azure-cli available on PyPi (2.29.1), we get the following error:
[gw8] win32 -- Python 3.7.9 c:\hostedtoolcache\windows\python\3.7.9\x64\python.exe
thing = <module 'azure.cli.core.auth' from 'c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\azure\\cli\\core\\auth\\__init__.py'>
comp = 'identity', import_path = 'azure.cli.core.auth.identity'
def _dot_lookup(thing, comp, import_path):
try:
> return getattr(thing, comp)
E AttributeError: module 'azure.cli.core.auth' has no attribute 'identity'
c:\hostedtoolcache\windows\python\3.7.9\x64\lib\unittest\mock.py:1152: AttributeError
During handling of the above exception, another exception occurred:
c:\hostedtoolcache\windows\python\3.7.9\x64\lib\site-packages\azure_devtools\scenario_tests\base.py:146: in setUp
patch(self)
..\azure-cli\src\azure-cli-testsdk\azure\cli\testsdk\patches.py:76: in patch_retrieve_token_for_user
mock_in_unit_test(unit_test, 'azure.cli.core.auth.identity.UserCredential', UserCredentialMock)
c:\hostedtoolcache\windows\python\3.7.9\x64\lib\site-packages\azure_devtools\scenario_tests\patches.py:36: in mock_in_unit_test
mp.__enter__()
c:\hostedtoolcache\windows\python\3.7.9\x64\lib\unittest\mock.py:1291: in __enter__
self.target = self.getter()
c:\hostedtoolcache\windows\python\3.7.9\x64\lib\unittest\mock.py:1465: in <lambda>
getter = lambda: _importer(target)
c:\hostedtoolcache\windows\python\3.7.9\x64\lib\unittest\mock.py:1165: in _importer
thing = _dot_lookup(thing, comp, import_path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
thing = <module 'azure.cli.core.auth' from 'c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\azure\\cli\\core\\auth\\__init__.py'>
comp = 'identity', import_path = 'azure.cli.core.auth.identity'
def _dot_lookup(thing, comp, import_path):
try:
return getattr(thing, comp)
except AttributeError:
> __import__(import_path)
E ModuleNotFoundError: No module named 'azure.cli.core.auth.identity'
c:\hostedtoolcache\windows\python\3.7.9\x64\lib\unittest\mock.py:1154: ModuleNotFoundError
To Reproduce
Run a CLI test using azure-cli-testsdk with the latest version (2.29.1) of azure-cli installed from Pip.
Expected behavior
azure-cli-testsdk should work with the latest version of azure-cli and azure-cli-core and should be able to patch both packages.
Environment summary
-cli
Cloned azure-cli repo and installed azure-cli-testsdk locally using pip install -e azure-cli/src/azure-cli-testsdk. Installed azure-cli using Pip, which pulled the latest version of the azure-cli/azure-cli-core (2.29.1). Shell type is powershell on Windows.
Additional context
The text was updated successfully, but these errors were encountered:
ghost
added
the
needs-triage
This is a new issue that needs to be triaged to the appropriate team.
label
Oct 21, 2021
needuv
changed the title
azure-cli-testsdk on main branch does not work with latest version of azure-cli/azure-cli-core (2.29.1) available on Pipazure-cli-testsdk on main branch does not work with latest version of azure-cli/azure-cli-core (2.29.1) available on PyPi
Oct 21, 2021
azure-cli-core and azure-cli-testsdk should be both from the dev branch, main branch. Using azure-cli-core from PyPI but azure-cli-testsdk from dev intermixed is NOT Supported.
Describe the bug
When running CLI tests using
azure-cli-testsdk
framework and the latest version ofazure-cli
available on PyPi (2.29.1), we get the following error:To Reproduce
Run a CLI test using
azure-cli-testsdk
with the latest version (2.29.1) ofazure-cli
installed from Pip.Expected behavior
azure-cli-testsdk
should work with the latest version ofazure-cli
andazure-cli-core
and should be able to patch both packages.Environment summary
-cli
Cloned azure-cli repo and installed
azure-cli-testsdk
locally usingpip install -e azure-cli/src/azure-cli-testsdk
. Installedazure-cli
using Pip, which pulled the latest version of the azure-cli/azure-cli-core (2.29.1). Shell type is powershell on Windows.Additional context
The text was updated successfully, but these errors were encountered: