Skip to content

Commit 3ad9015

Browse files
committed
remove commented code
1 parent a5c5ff8 commit 3ad9015

File tree

1 file changed

+3
-30
lines changed

1 file changed

+3
-30
lines changed

tests/test_force_refresh.py

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import logging
44
import sys
55

6-
# from tests.test_e2e import LabBasedTestCase
7-
86
if not sys.platform.startswith("win"):
97
raise unittest.SkipTest("Currently, our broker supports Windows")
108

@@ -14,35 +12,10 @@
1412
_AZURE_CLI,
1513
authority="https://login.microsoftonline.com/organizations",
1614
enable_broker_on_mac=True,
17-
enable_broker_on_windows=True)
18-
19-
20-
# class ForceRefreshTestCase(LabBasedTestCase):
21-
# def test_silent_with_force_refresh(self):
22-
# # acquire token using username and password
23-
# print("Testing silent flow with force_refresh=True")
24-
# config = self.get_lab_user(usertype="cloud")
25-
# config["password"] = self.get_lab_user_secret(config["lab_name"])
26-
# result = pca.acquire_token_by_username_password(username=config["lab_name"], password=config["password"], scopes=config["scope"])
27-
# # assert username and password, "You need to provide a test account and its password"
28-
29-
# ropcToken = result.get("access_token")
30-
# accounts = pca.get_accounts()
31-
# account = accounts[0]
32-
# assert account, "The logged in account should have been established by interactive flow"
33-
34-
# result = pca.acquire_token_silent(
35-
# config["scope"],
36-
# account=account,
37-
# force_refresh=False,
38-
# auth_scheme=None, data=None)
39-
40-
# assert result.get("access_token") == ropcToken, "Token should not be refreshed"
41-
15+
enable_broker_on_windows=True)
4216

4317
class ForceRefreshTestCase(unittest.TestCase):
4418
def test_silent_with_force_refresh(self):
45-
# acquire token using username and password
4619
print("Testing silent flow with force_refresh=True")
4720
result = pca.acquire_token_interactive(scopes=[SCOPE_ARM], prompt="select_account", parent_window_handle=pca.CONSOLE_WINDOW_HANDLE, enable_msa_passthrough=True)
4821
accounts = pca.get_accounts()
@@ -56,7 +29,7 @@ def test_silent_with_force_refresh(self):
5629
account=account,
5730
force_refresh=False)
5831

59-
# This token should be recieved from cache
32+
# This token should have been recieved from cache
6033
assert result.get("access_token") == oldToken, "Token should not be refreshed"
6134

6235

@@ -65,5 +38,5 @@ def test_silent_with_force_refresh(self):
6538
account=account,
6639
force_refresh=True)
6740

68-
# Token will be different proving it is not from cache and was renewed
41+
# Token will be different proving it is not token from cache and was renewed
6942
assert result.get("access_token") != oldToken, "Token should be refreshed"

0 commit comments

Comments
 (0)