diff options
Diffstat (limited to 'tests/unit/scheduler/test_host_filters.py')
-rw-r--r-- | tests/unit/scheduler/test_host_filters.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/unit/scheduler/test_host_filters.py b/tests/unit/scheduler/test_host_filters.py index 7d3a0e4..566a9fb 100644 --- a/tests/unit/scheduler/test_host_filters.py +++ b/tests/unit/scheduler/test_host_filters.py @@ -169,6 +169,36 @@ class ExtraSpecsOpsTestCase(utils.BaseTestCase): req='<in> 11 <in>', matches=False) + def test_extra_specs_matches_with_op_is(self): + self._do_extra_specs_ops_test( + value=True, + req='<is> True', + matches=True) + + def test_extra_specs_matches_with_op_is2(self): + self._do_extra_specs_ops_test( + value=False, + req='<is> False', + matches=True) + + def test_extra_specs_matches_with_op_is3(self): + self._do_extra_specs_ops_test( + value=False, + req='<is> Nonsense', + matches=True) + + def test_extra_specs_fails_with_op_is(self): + self._do_extra_specs_ops_test( + value=True, + req='<is> False', + matches=False) + + def test_extra_specs_fails_with_op_is2(self): + self._do_extra_specs_ops_test( + value=False, + req='<is> True', + matches=False) + def test_extra_specs_matches_with_op_or(self): self._do_extra_specs_ops_test( value='12', |