fireworks_schema/tests/fw_serializers_test.py
def _validate_from_file(self, module, classname):
        """ validate a set of samples against the schema via from_file() """
        namespace = __import__(module.split('.')[0])
        for subpackage in module.split('.')[1:]:
            namespace = getattr(namespace, subpackage)
        cls = getattr(namespace, classname)
        path = os.path.join(SAMPLES_DIR, classname.lower())
        for sfile in os.listdir(path):
            if sfile in self.skip_list:
                continue
            try:
                cls.from_file(os.path.join(path, sfile))
            except ValidationError as err:
                self.fail('Validation error: '+err.message)
 validate a set of samples against the schema via from_file() 
validate a set of samples against the schema via from_file()
validate a set of samples against the schema via from_file ()
def _validate_from_file(self, module, classname):
        namespace = __import__(module.split('.')[0])
        for subpackage in module.split('.')[1:]:
            namespace = getattr(namespace, subpackage)
        cls = getattr(namespace, classname)
        path = os.path.join(SAMPLES_DIR, classname.lower())
        for sfile in os.listdir(path):
            if sfile in self.skip_list:
                continue
            try:
                cls.from_file(os.path.join(path, sfile))
            except ValidationError as err:
                self.fail('Validation error: '+err.message)
def _validate_from_file ( self , module , classname ) : namespace = __import__ ( module . split ( '.' ) [ 0 ] ) for subpackage in module . split ( '.' ) [ 1 : ] : namespace = getattr ( namespace , subpackage ) cls = getattr ( namespace , classname ) path = os . path . join ( SAMPLES_DIR , classname . lower ( ) ) for sfile in os . listdir ( path ) : if sfile in self . skip_list : continue try : cls . from_file ( os . path . join ( path , sfile ) ) except ValidationError as err : self . fail ( 'Validation error: ' + err . message )
validate a set of samples against the schema via from_file()
validate a set of samples against the schema via from_file ()
""" validate a set of samples against the schema via from_file() """
self
module
classname