<s> import json <EOL> import os <EOL> from awscli . testutils import BaseAWSCommandParamsTest , FileCreator <EOL> class TestAddModel ( BaseAWSCommandParamsTest ) : <EOL> prefix = '<STR_LIT>' <EOL> def setUp ( self ) : <EOL> super ( TestAddModel , self ) . setUp ( ) <EOL> self . files = FileCreator ( ) <EOL> self . customer_data_root = self . files . rootdir <EOL> self . data_loader = self . driver . session . get_component ( '<STR_LIT>' ) <EOL> self . data_loader . CUSTOMER_DATA_PATH = self . customer_data_root <EOL> self . service_definition = { <EOL> "<STR_LIT:version>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : '<STR_LIT>' , <EOL> "<STR_LIT>" : '<STR_LIT>' , <EOL> } , <EOL> "<STR_LIT>" : { } , <EOL> "<STR_LIT>" : { } <EOL> } <EOL> def tearDown ( self ) : <EOL> super ( TestAddModel , self ) . tearDown ( ) <EOL> self . files . remove_all ( ) <EOL> def test_add_model ( self ) : <EOL> cmdline = self . prefix + '<STR_LIT>' % json . dumps ( <EOL> self . service_definition , separators = ( '<STR_LIT:U+002C>' , '<STR_LIT::>' ) ) <EOL> self . run_cmd ( cmdline ) <EOL> self . assertTrue ( <EOL> os . path . exists ( os . path . join ( <EOL> self . customer_data_root , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) ) ) <EOL> def test_add_model_with_service_name ( self ) : <EOL> cmdline = self . prefix + '<STR_LIT>' % json . dumps ( <EOL> self . service_definition , separators = ( '<STR_LIT:U+002C>' , '<STR_LIT::>' ) ) <EOL> cmdline += '<STR_LIT>' <EOL> self . run_cmd ( cmdline ) <EOL> self . assertTrue ( <EOL> os . path . exists ( os . path . join ( <EOL> self . customer_data_root , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) ) ) </s>
