コード例 #1
0
 def test_module_parameters(self):
     args = dict(
         name='foo.baz.bar',
         pool_lb_method='round-robin',
     )
     p = ModuleParameters(params=args)
     assert p.name == 'foo.baz.bar'
     assert p.pool_lb_method == 'round-robin'
コード例 #2
0
 def test_module_not_fqdn_name(self):
     args = dict(
         name='foo',
         lb_method='round-robin'
     )
     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.value)
コード例 #3
0
 def test_module_pools(self):
     args = dict(
         pools=[
             dict(
                 name='foo',
                 ratio='100'
             )
         ]
     )
     p = ModuleParameters(params=args)
     assert len(p.pools) == 1