<s> from cinderclient . v2 . pools import Pool <EOL> from cinderclient . tests . unit import utils <EOL> from cinderclient . tests . unit . v2 import fakes <EOL> cs = fakes . FakeClient ( ) <EOL> class PoolsTest ( utils . TestCase ) : <EOL> def test_get_pool_stats ( self ) : <EOL> sl = cs . pools . list ( ) <EOL> cs . assert_called ( '<STR_LIT:GET>' , '<STR_LIT>' ) <EOL> self . _assert_request_id ( sl ) <EOL> for s in sl : <EOL> self . assertIsInstance ( s , Pool ) <EOL> self . assertTrue ( hasattr ( s , "<STR_LIT:name>" ) ) <EOL> self . assertFalse ( hasattr ( s , "<STR_LIT>" ) ) <EOL> self . assertFalse ( hasattr ( s , "<STR_LIT>" ) ) <EOL> def test_get_detail_pool_stats ( self ) : <EOL> sl = cs . pools . list ( detailed = True ) <EOL> self . _assert_request_id ( sl ) <EOL> cs . assert_called ( '<STR_LIT:GET>' , '<STR_LIT>' ) <EOL> for s in sl : <EOL> self . assertIsInstance ( s , Pool ) <EOL> self . assertTrue ( hasattr ( s , "<STR_LIT:name>" ) ) <EOL> self . assertFalse ( hasattr ( s , "<STR_LIT>" ) ) <EOL> self . assertTrue ( hasattr ( s , "<STR_LIT>" ) ) </s>
