[IMP] nsca_client: pre-commit auto fixes

pull/2922/head
Luis Rodriguez 2024-04-24 10:13:54 +02:00
parent 93b85b96af
commit 7cecd3c6cf
5 changed files with 14 additions and 6 deletions

View File

@ -18,7 +18,7 @@ class NscaCheck(models.Model):
"ir.cron", string="Cron", required=True, ondelete="cascade", readonly=True
)
server_id = fields.Many2one("nsca.server", string="Server", required=True)
service = fields.Char("Service", required=True)
service = fields.Char(required=True)
nsca_model = fields.Char("NSCA Model")
nsca_function = fields.Char("Method")
nsca_args = fields.Char("Arguments")
@ -55,7 +55,8 @@ class NscaCheck(models.Model):
"doall": False,
"numbercall": -1,
}
super(NscaCheck, check).write(vals)
res = super(NscaCheck, check).write(vals)
return res
@api.model
def create(self, vals):

View File

@ -29,8 +29,8 @@ class NscaServer(models.Model):
_description = "NSCA Server"
name = fields.Char("Hostname", required=True)
port = fields.Integer("Port", default=5667, required=True)
password = fields.Char("Password")
port = fields.Integer(default=5667, required=True)
password = fields.Char()
encryption_method = fields.Selection(
selection="_selection_encryption_method",
string="Encryption method",

View File

@ -17,8 +17,8 @@ class Popen:
self.stderr = stderr
# flake8: noqa: B902
def communicate(input):
return ["test"]
# def communicate(input):
# return ["test"]
class TestNsca(TransactionCase):

View File

@ -0,0 +1 @@
../../../../nsca_client

View File

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)