def test_module_parameters_name(self):
     args = dict(name='rule1')
     p = ModuleParameters(params=args)
     assert p.name == 'rule1'
 def test_module_parameters_actions(self):
     args = dict(actions=[dict(type='forward', pool='pool-svrs')])
     p = ModuleParameters(params=args)
     assert len(p.actions) == 1
 def test_module_parameters_conditions(self):
     args = dict(
         conditions=[dict(type='http_uri', path_begins_with_any=['/ABC'])])
     p = ModuleParameters(params=args)
     assert len(p.conditions) == 1
 def test_module_parameters_policy(self):
     args = dict(policy='Policy - Foo')
     p = ModuleParameters(params=args)
     assert p.policy == 'Policy - Foo'