-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,15 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import warnings | ||
|
||
def test_local(pepper_client, session_minion_id): | ||
assert pepper_client.local('*', 'test.ping')['return'][0][session_minion_id] is True | ||
|
||
|
||
def test_local_with_tgt_type(pepper_client, session_minion_id): | ||
warnings.warn(UserWarning(str(pepper_client.local('*', 'test.ping', tgt_type='list')['return']))) | ||
warnings.warn(UserWarning(str(pepper_client.local(session_minion_id, 'test.ping', tgt_type='list')['return']))) | ||
assert pepper_client.local('*', 'test.ping', tgt_type='list')['return'][0][session_minion_id] is False | ||
assert pepper_client.local(session_minion_id, 'test.ping', tgt_type='list')['return'][0][session_minion_id] is True | ||
|
||
|
||
def test_local_with_deprecated_expr_form(pepper_client, session_minion_id): | ||
warnings.warn(UserWarning(str(pepper_client.local('*', 'test.ping', expr_form='list')['return'][0]))) | ||
warnings.warn(UserWarning(str(pepper_client.local(session_minion_id, 'test.ping', expr_form='list')['return']))) | ||
assert pepper_client.local('*', 'test.ping', expr_form='list')['return'][0][session_minion_id] is False | ||
assert pepper_client.local(session_minion_id, 'test.ping', expr_form='list')['return'][0][session_minion_id] is True | ||
r = pepper_client.local(session_minion_id, 'test.ping', expr_form='list')['return'][0][session_minion_id] | ||
assert r is True |