fixes issue with recieve parameter idempotency (#59999)
fixes assert statements in unit tests
This commit is contained in:
parent
6e8798fa88
commit
c9a9621a02
6 changed files with 14 additions and 6 deletions
|
@ -481,6 +481,10 @@ class Difference(object):
|
|||
def description(self):
|
||||
return cmp_str_with_none(self.want.description, self.have.description)
|
||||
|
||||
@property
|
||||
def receive(self):
|
||||
return cmp_str_with_none(self.want.receive, self.have.receive)
|
||||
|
||||
@property
|
||||
def receive_disable(self):
|
||||
return cmp_str_with_none(self.want.receive_disable, self.have.receive_disable)
|
||||
|
|
|
@ -485,6 +485,10 @@ class Difference(object):
|
|||
def description(self):
|
||||
return cmp_str_with_none(self.want.description, self.have.description)
|
||||
|
||||
@property
|
||||
def receive(self):
|
||||
return cmp_str_with_none(self.want.receive, self.have.receive)
|
||||
|
||||
@property
|
||||
def receive_disable(self):
|
||||
return cmp_str_with_none(self.want.receive_disable, self.have.receive_disable)
|
||||
|
|
|
@ -292,7 +292,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert 'must be between' in str(ex)
|
||||
assert 'must be between' in str(ex.value)
|
||||
|
||||
def test_set_multicast_address(self, *args):
|
||||
set_module_args(dict(
|
||||
|
|
|
@ -120,7 +120,7 @@ class TestParameters(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as excinfo:
|
||||
p = ModuleParameters(params=args)
|
||||
assert p.name == 'foo'
|
||||
assert 'The provided name must be a valid FQDN' in str(excinfo)
|
||||
assert 'The provided name must be a valid FQDN' in str(excinfo.value)
|
||||
|
||||
|
||||
class TestUntypedManager(unittest.TestCase):
|
||||
|
|
|
@ -305,7 +305,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert "must be less than" in str(ex)
|
||||
assert "must be less than" in str(ex.value)
|
||||
|
||||
def test_update_interval_larger_than_new_timeout(self, *args):
|
||||
set_module_args(dict(
|
||||
|
@ -335,7 +335,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert "must be less than" in str(ex)
|
||||
assert "must be less than" in str(ex.value)
|
||||
|
||||
def test_update_send(self, *args):
|
||||
set_module_args(dict(
|
||||
|
|
|
@ -305,7 +305,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert "must be less than" in str(ex)
|
||||
assert "must be less than" in str(ex.value)
|
||||
|
||||
def test_update_interval_larger_than_new_timeout(self, *args):
|
||||
set_module_args(dict(
|
||||
|
@ -335,7 +335,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert "must be less than" in str(ex)
|
||||
assert "must be less than" in str(ex.value)
|
||||
|
||||
def test_update_send(self, *args):
|
||||
set_module_args(dict(
|
||||
|
|
Loading…
Reference in a new issue