<s> import unittest <EOL> from tests import SmsApiTestCase <EOL> from smsapi . responses import ApiResponse <EOL> class ServiceClientTestCase ( SmsApiTestCase ) : <EOL> def setUp ( self ) : <EOL> super ( ServiceClientTestCase , self ) . setUp ( ) <EOL> self . api . service ( '<STR_LIT>' ) <EOL> self . subuser_id = None <EOL> def test_add_subuser ( self ) : <EOL> self . api . action ( '<STR_LIT>' , { <EOL> '<STR_LIT:username>' : '<STR_LIT>' , <EOL> '<STR_LIT:password>' : '<STR_LIT>' <EOL> } ) <EOL> response = self . api . execute ( ) <EOL> self . assertIsInstance ( response , ApiResponse ) <EOL> self . assertEqual ( response . username , '<STR_LIT>' % self . api_username ) <EOL> def test_edit_subuser ( self ) : <EOL> self . api . action ( '<STR_LIT>' , { <EOL> '<STR_LIT:username>' : '<STR_LIT>' , <EOL> '<STR_LIT:password>' : '<STR_LIT>' <EOL> } ) <EOL> response1 = self . api . execute ( ) <EOL> self . api . action ( '<STR_LIT>' , { <EOL> '<STR_LIT:username>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : <NUM_LIT:1> <EOL> } ) <EOL> response2 = self . api . execute ( ) <EOL> self . assertIsInstance ( response2 , ApiResponse ) <EOL> self . assertEqual ( response1 . limit , <NUM_LIT:0> ) <EOL> self . assertFalse ( response1 . active ) <EOL> self . assertEqual ( response2 . status_code , <NUM_LIT:200> ) <EOL> self . assertTrue ( response2 . active ) <EOL> def test_subuser_details ( self ) : <EOL> month_limit = <NUM_LIT> <EOL> self . api . action ( '<STR_LIT>' , { <EOL> '<STR_LIT:username>' : '<STR_LIT>' , <EOL> '<STR_LIT:password>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : month_limit <EOL> } ) <EOL> self . api . execute ( ) <EOL> self . api . action ( '<STR_LIT>' ) <EOL> self . api . set_user ( '<STR_LIT>' ) <EOL> response = self . api . execute ( ) <EOL> self . assertIsInstance ( response , ApiResponse ) <EOL> self . assertEqual ( <NUM_LIT:0> , int ( response . active ) ) <EOL> self . assertEqual ( month_limit , float ( response . month_limit ) ) <EOL> def test_account_details ( self ) : <EOL> response = self . api . action ( '<STR_LIT>' ) . execute ( ) <EOL> self . assertTrue ( response . points ) <EOL> def suite ( ) : <EOL> suite = unittest . TestSuite ( ) <EOL> suite . addTest ( unittest . makeSuite ( ServiceClientTestCase ) ) <EOL> return suite </s>
