[IMP] nsca_client: pre-commit auto fixes
parent
93b85b96af
commit
7cecd3c6cf
|
@ -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):
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../../../nsca_client
|
|
@ -0,0 +1,6 @@
|
|||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
Loading…
Reference in New Issue