

def testArtifactsValidate(self):
    'Check each artifact we have passes validation.'
    for artifact in artifact_registry.REGISTRY.GetArtifacts():
        artifact.Validate()
    art_obj = artifact_registry.REGISTRY.GetArtifact('TestCmdArtifact')
    art_obj.labels.append('BadLabel')
    self.assertRaises(artifact_registry.ArtifactDefinitionError, art_obj.Validate)

dataset/ETHPy150Open google/grr/grr/lib/artifact_utils_test.py ArtifactHandlingTest.testArtifactsValidate/original