<s> from __future__ import ( absolute_import , division , generators , nested_scopes , print_function , <EOL> unicode_literals , with_statement ) <EOL> from pants . backend . jvm . artifact import Artifact , PublicationMetadata <EOL> from pants . backend . jvm . repository import Repository <EOL> from pants_test . base_test import BaseTest <EOL> class ArtifactTest ( BaseTest ) : <EOL> def test_validation ( self ) : <EOL> repo = Repository ( name = "<STR_LIT>" , <EOL> url = "<STR_LIT>" , <EOL> push_db_basedir = "<STR_LIT>" ) <EOL> class TestPublicationMetadata ( PublicationMetadata ) : <EOL> def _compute_fingerprint ( self ) : <EOL> return None <EOL> metadata = TestPublicationMetadata ( ) <EOL> Artifact ( org = "<STR_LIT>" , name = "<STR_LIT>" , repo = repo , publication_metadata = metadata ) <EOL> with self . assertRaises ( ValueError ) : <EOL> Artifact ( org = <NUM_LIT:1> , name = "<STR_LIT>" , repo = repo , publication_metadata = metadata ) <EOL> with self . assertRaises ( ValueError ) : <EOL> Artifact ( org = "<STR_LIT>" , name = <NUM_LIT:1> , repo = repo , publication_metadata = metadata ) <EOL> with self . assertRaises ( ValueError ) : <EOL> Artifact ( org = "<STR_LIT>" , name = "<STR_LIT>" , repo = <NUM_LIT:1> , publication_metadata = metadata ) <EOL> with self . assertRaises ( ValueError ) : <EOL> Artifact ( org = "<STR_LIT>" , name = "<STR_LIT>" , repo = repo , publication_metadata = <NUM_LIT:1> ) </s>
