Test executing master_call with lowdata The choice of using error.error for this is arbitrary and should be changed to some mocked function that is more testing friendly.
(client, client_config, auth_creds)
| 33 | |
| 34 | |
| 35 | def test_token(client, client_config, auth_creds): |
| 36 | """ |
| 37 | Test executing master_call with lowdata |
| 38 | |
| 39 | The choice of using error.error for this is arbitrary and should be |
| 40 | changed to some mocked function that is more testing friendly. |
| 41 | """ |
| 42 | auth = salt.auth.LoadAuth(client_config) |
| 43 | token = auth.mk_token(auth_creds) |
| 44 | |
| 45 | low = { |
| 46 | "client": "runner", |
| 47 | "fun": "error.error", |
| 48 | "token": token["token"], |
| 49 | } |
| 50 | ret = client.master_call(**low) |
| 51 | assert ret |
| 52 | assert "jid" in ret |
| 53 | assert "tag" in ret |
| 54 | assert ret["tag"] == "salt/run/{}".format(ret["jid"]) |
| 55 | |
| 56 | |
| 57 | def test_cmd_sync(client, auth_creds): |
nothing calls this directly
no test coverage detected