def test_user_delete(conn_args, query_return, mock_login): """ query_submitted = {"params": [3], "jsonrpc": "2.0", "id": 0, "auth": "68d38eace8e42a35c8d0c6a2ab0245a6", "method": "user.delete"} """ module_return = ["3"] query_return({"jsonrpc": "2.0", "result": {"userids": ["3"]}, "id": 0}) assert zabbix.user_delete(3, **conn_args) == module_return
def test_user_delete(self): """ query_submitted = {"params": [3], "jsonrpc": "2.0", "id": 0, "auth": "68d38eace8e42a35c8d0c6a2ab0245a6", "method": "user.delete"} """ module_return = ["3"] query_return = {"jsonrpc": "2.0", "result": {"userids": ["3"]}, "id": 0} with patch.object(zabbix, "_query", return_value=query_return): with patch.object(zabbix, "_login", return_value=CONN_ARGS): self.assertEqual(zabbix.user_delete(3, **CONN_ARGS), module_return)