<s> """<STR_LIT>""" <EOL> import pytest <EOL> from osbs . build . spec import BuildIDParam , RegistryURIsParam , CommonSpec <EOL> from osbs . exceptions import OsbsValidationException <EOL> from tests . constants import TEST_USER <EOL> class TestBuildIDParam ( object ) : <EOL> def test_build_id_param_shorten_id ( self ) : <EOL> p = BuildIDParam ( ) <EOL> p . value = "<STR_LIT:x>" * <NUM_LIT> <EOL> val = p . value <EOL> assert len ( val ) == <NUM_LIT> <EOL> def test_build_id_param_raise_exc ( self ) : <EOL> p = BuildIDParam ( ) <EOL> with pytest . raises ( OsbsValidationException ) : <EOL> p . value = r"<STR_LIT>" <EOL> class TestRegistryURIsParam ( object ) : <EOL> @ pytest . mark . parametrize ( '<STR_LIT>' , [ '<STR_LIT>' , '<STR_LIT:/>' ] ) <EOL> def test_registry_uris_param_api_implicit ( self , suffix ) : <EOL> p = RegistryURIsParam ( ) <EOL> p . value = [ '<STR_LIT>' . format ( suffix = suffix ) ] <EOL> assert p . value [ <NUM_LIT:0> ] . uri == '<STR_LIT>' <EOL> assert p . value [ <NUM_LIT:0> ] . docker_uri == '<STR_LIT>' <EOL> assert p . value [ <NUM_LIT:0> ] . version == '<STR_LIT>' <EOL> def test_registry_uris_param_v2 ( self ) : <EOL> p = RegistryURIsParam ( ) <EOL> p . value = [ '<STR_LIT>' ] <EOL> assert p . value [ <NUM_LIT:0> ] . uri == '<STR_LIT>' <EOL> assert p . value [ <NUM_LIT:0> ] . docker_uri == '<STR_LIT>' <EOL> assert p . value [ <NUM_LIT:0> ] . version == '<STR_LIT>' <EOL> class TestCommonSpec ( object ) : <EOL> def test_registry_uris_param_v2 ( self ) : <EOL> spec = CommonSpec ( ) <EOL> spec . set_params ( registry_uris = [ '<STR_LIT>' ] , <EOL> user = TEST_USER ) <EOL> registry = spec . registry_uris . value [ <NUM_LIT:0> ] <EOL> assert registry . uri == '<STR_LIT>' <EOL> assert registry . docker_uri == '<STR_LIT>' <EOL> assert registry . version == '<STR_LIT>' </s>
