remove BadMappingSubclass and rename MappingSubclass

This commit is contained in:
Patric Schmitz 2015-11-28 20:17:31 +01:00
parent dbc6f63fc0
commit 913aa209c6

View File

@ -225,7 +225,7 @@ class TestBaseType:
assert basetype.complete() == completions
class GoodMappingSubclass(configtypes.MappingType):
class MappingSubclass(configtypes.MappingType):
"""A MappingType we use in TestMappingType which is valid/good."""
@ -239,19 +239,6 @@ class GoodMappingSubclass(configtypes.MappingType):
self.valid_values = configtypes.ValidValues('one', 'two')
class BadMappingSubclass(configtypes.MappingType):
"""A MappingType which is missing a value in MAPPING."""
MAPPING = {
'one': 1,
}
def __init__(self, none_ok=False):
super().__init__(none_ok)
self.valid_values = configtypes.ValidValues('one', 'two')
class TestMappingType:
"""Test MappingType."""
@ -265,7 +252,7 @@ class TestMappingType:
@pytest.fixture
def klass(self):
return GoodMappingSubclass
return MappingSubclass
@pytest.mark.parametrize('val', TESTS.keys())
def test_validate_valid(self, klass, val):