def __init__(cls, name, bases, attributes): from nautilus.conventions.models import normalize_string # create the super class super().__init__(name, bases, attributes) # the base service strings base_strings = [ normalize_string(name) for name in ['service', 'modelService', 'ConnectionService'] ] # if the object does not yet have a name if not cls.name or cls.name in base_strings: # use the name of the class record cls.name = normalize_string(name)
def __init__(cls, name, bases, attributes): from nautilus.conventions.models import normalize_string # create the super class super().__init__(name, bases, attributes) # the base service strings base_strings = [normalize_string(name) for name in [ 'service', 'modelService', 'ConnectionService' ]] # if the object does not yet have a name if not cls.name or cls.name in base_strings: # use the name of the class record cls.name = normalize_string(name)
def test_normalize_string_handles_ClassCase(self): string = 'FooBar' assert normalize_string(string) == 'fooBar', ( "ClassCase string could not be normalized" )
def test_normalize_string_handles_ClassCase(self): string = 'FooBar' assert normalize_string(string) == 'fooBar', ( "ClassCase string could not be normalized")