Change datatype base to raise AttributeError on missing keys
This commit is contained in:
		
							parent
							
								
									7b95082a99
								
							
						
					
					
						commit
						584a18c0e1
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -28,7 +28,7 @@ def datatype(name, static_fields): | |||
|       if name in static_fields: | ||||
|         return self._fields[name] | ||||
| 
 | ||||
|       return None | ||||
|       raise AttributeError('Unknown field `%s`' % name) | ||||
| 
 | ||||
|   return DataType | ||||
| 
 | ||||
|  |  | |||
|  | @ -64,7 +64,7 @@ def test_lookup_manifests(repo_namespace, repo_name, pre_oci_model): | |||
|   found_tag = pre_oci_model.find_matching_tag(repository_ref, ['latest']) | ||||
|   found_manifest = pre_oci_model.get_manifest_for_tag(found_tag) | ||||
|   found = pre_oci_model.lookup_manifest_by_digest(repository_ref, found_manifest.digest) | ||||
|   assert found.id == found_manifest.id | ||||
|   assert found._db_id == found_manifest._db_id | ||||
|   assert found.digest == found_manifest.digest | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Reference in a new issue