BUG Bix:
Some checks failed
continuous-integration/drone/push Build is failing

LmwSip().lasttime("H10") --> LmwSip(host=None).lasttime("H10")

  Dit voorkomt het opzetten van een connectie.
  Dit veroorzaakte ook problemen in de zelftest.
This commit is contained in:
Marcel Nijenhof
2021-12-08 16:58:00 +01:00
parent 3414fde39c
commit a884a5295b
2 changed files with 5 additions and 5 deletions

View File

@@ -34,7 +34,7 @@ def run(args):
pass pass
def main(): def main():
lastTime=LmwSip().lasttime("H10") lastTime=LmwSip(host=None).lasttime("H10")
parser = argparse.ArgumentParser(description="Run a sip file.") parser = argparse.ArgumentParser(description="Run a sip file.")
parser.add_argument("-u", "--unencrypted", action="store_true", parser.add_argument("-u", "--unencrypted", action="store_true",
help="Run a sip connection without ssl") help="Run a sip connection without ssl")

View File

@@ -39,19 +39,19 @@ class lmwsipTest(unittest.TestCase):
self.assertEqual(type(self.sip), lmwsip.LmwSip) self.assertEqual(type(self.sip), lmwsip.LmwSip)
def test_H1(self): def test_H1(self):
self.sip = lmwsip.LmwSip() self.sip = lmwsip.LmwSip(host=None)
self.assertEqual(self.sip.period('H1'), 1) self.assertEqual(self.sip.period('H1'), 1)
def test_H10(self): def test_H10(self):
self.sip = lmwsip.LmwSip() self.sip = lmwsip.LmwSip(host=None)
self.assertEqual(self.sip.period('H10'), 10) self.assertEqual(self.sip.period('H10'), 10)
def test_xHm0(self): def test_xHm0(self):
self.sip = lmwsip.LmwSip() self.sip = lmwsip.LmwSip(host=None)
self.assertEqual(self.sip.period('xHm0'), 10) self.assertEqual(self.sip.period('xHm0'), 10)
def test_Noparm(self): def test_Noparm(self):
self.sip = lmwsip.LmwSip() self.sip = lmwsip.LmwSip(host=None)
with self.assertRaises(lmwsip.LmwParmWarn): with self.assertRaises(lmwsip.LmwParmWarn):
self.assertEqual(self.sip.period('Noparm'), None) self.assertEqual(self.sip.period('Noparm'), None)