Exemple #1
0
 def test_adapters_without_default(self, new_dimension_conflict):
     """Verify adapters without default values (filter everything out)"""
     param = {'name': 'new', 'type': 'real', 'value': Dimension.NO_DEFAULT_VALUE}
     resolution = new_dimension_conflict.AddDimensionResolution(new_dimension_conflict)
     resolution_adapters = resolution.get_adapters()
     assert len(resolution_adapters) == 1
     assert (resolution_adapters[0].configuration ==
             adapters.DimensionAddition(param).configuration)
Exemple #2
0
 def test_adapters_with_default(self, new_dimension_conflict):
     """Verify adapters with default values"""
     param = {"name": "new", "type": "real", "value": 1.1}
     resolution = new_dimension_conflict.AddDimensionResolution(
         new_dimension_conflict, default_value=1.1)
     resolution_adapters = resolution.get_adapters()
     assert len(resolution_adapters) == 1
     assert (resolution_adapters[0].configuration ==
             adapters.DimensionAddition(param).configuration)