|
6 | 6 | # pylint: disable=protected-access |
7 | 7 |
|
8 | 8 | import unittest |
9 | | -from azure.cli.core.auth.util import scopes_to_resource, resource_to_scopes, _normalize_scopes, _generate_login_command |
| 9 | +from azure.cli.core.auth.util import scopes_to_resource, resource_to_scopes, _generate_login_command |
10 | 10 |
|
11 | 11 |
|
12 | 12 | class TestUtil(unittest.TestCase): |
@@ -50,21 +50,6 @@ def test_resource_to_scopes(self): |
50 | 50 | self.assertEqual(resource_to_scopes('https://managedhsm.azure.com'), |
51 | 51 | ['https://managedhsm.azure.com/.default']) |
52 | 52 |
|
53 | | - def test_normalize_scopes(self): |
54 | | - # Test no scopes |
55 | | - self.assertIsNone(_normalize_scopes(())) |
56 | | - self.assertIsNone(_normalize_scopes([])) |
57 | | - self.assertIsNone(_normalize_scopes(None)) |
58 | | - |
59 | | - # Test multiple scopes, with the first one discarded |
60 | | - scopes = _normalize_scopes(("https://management.core.windows.net//.default", |
61 | | - "https://management.core.chinacloudapi.cn//.default")) |
62 | | - self.assertEqual(list(scopes), ["https://management.core.chinacloudapi.cn//.default"]) |
63 | | - |
64 | | - # Test single scopes (the correct usage) |
65 | | - scopes = _normalize_scopes(("https://management.core.chinacloudapi.cn//.default",)) |
66 | | - self.assertEqual(list(scopes), ["https://management.core.chinacloudapi.cn//.default"]) |
67 | | - |
68 | 53 | def test_generate_login_command(self): |
69 | 54 | # No parameter is given |
70 | 55 | assert _generate_login_command() == 'az login' |
|
0 commit comments