<s> from mistralclient . api . v2 import services <EOL> from mistralclient . tests . unit . v2 import base <EOL> SERVICE = { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT:type>' : '<STR_LIT>' , <EOL> } <EOL> URL_TEMPLATE = '<STR_LIT>' <EOL> class TestServicesV2 ( base . BaseClientV2Test ) : <EOL> def test_list ( self ) : <EOL> mock = self . mock_http_get ( content = { '<STR_LIT>' : [ SERVICE ] } ) <EOL> service_list = self . services . list ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( service_list ) ) <EOL> srv = service_list [ <NUM_LIT:0> ] <EOL> self . assertDictEqual ( <EOL> services . Service ( self . services , SERVICE ) . to_dict ( ) , <EOL> srv . to_dict ( ) <EOL> ) <EOL> mock . assert_called_once_with ( URL_TEMPLATE ) </s>
