<s> from sahara . plugins . mapr . domain import distro as distro <EOL> import sahara . tests . unit . base as b <EOL> class TestDistro ( b . SaharaTestCase ) : <EOL> def __init__ ( self , * args , ** kwds ) : <EOL> super ( TestDistro , self ) . __init__ ( * args , ** kwds ) <EOL> self . install_cmd = '<STR_LIT>' <EOL> self . separator = '<STR_LIT:->' <EOL> self . distro = distro . Distro ( '<STR_LIT:foo>' , self . install_cmd , self . separator ) <EOL> def test_create_install_cmd ( self ) : <EOL> pkgs = [ ( '<STR_LIT:foo>' , ) , ( '<STR_LIT:bar>' , '<STR_LIT:version>' ) ] <EOL> cmd = self . distro . create_install_cmd ( pkgs ) <EOL> self . assertIsNotNone ( cmd ) <EOL> parts = cmd . split ( '<STR_LIT:U+0020>' ) <EOL> self . assertEqual ( self . install_cmd , parts [ <NUM_LIT:0> ] ) <EOL> self . assertEqual ( '<STR_LIT:foo>' , parts [ <NUM_LIT:1> ] ) <EOL> self . assertEqual ( '<STR_LIT:bar>' , parts [ <NUM_LIT:2> ] . split ( self . separator ) [ <NUM_LIT:0> ] ) <EOL> self . assertEqual ( '<STR_LIT>' , parts [ <NUM_LIT:2> ] . split ( self . separator ) [ <NUM_LIT:1> ] ) </s>
