Skip to content

Commit c3ed4fa

Browse files
twangboydwoz
authored andcommitted
Add some tests
1 parent 8378577 commit c3ed4fa

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/pytests/functional/modules/test_win_useradd.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,19 @@ def test_info_int(user, account_int):
214214
assert ret["uid"].startswith("S-1-5")
215215

216216

217+
def test_info_domain_local(user, account_str):
218+
domain = "." # localhost or hostname doesn't work, only .
219+
ret = user.info(f"{domain}\\{account_str.username}")
220+
assert ret["name"] == account_str.username
221+
assert ret["uid"].startswith("S-1-5")
222+
223+
224+
def test_info_domain_not_found(user, account_str):
225+
domain = "junk.com"
226+
ret = user.info(f"{domain}\\{account_str.username}")
227+
assert ret == {}
228+
229+
217230
def test_list_groups_str(user, account_str):
218231
ret = user.list_groups(account_str.username)
219232
assert ret == ["Users"]

0 commit comments

Comments
 (0)