<s> """<STR_LIT>""" <EOL> import unittest <EOL> from mock import patch <EOL> from test_utils import GetExpectedPrintOutput <EOL> from test_utils import LoadTestJsonFile <EOL> from tokens_api_test_base import TokensApiPrintTokensTestBase <EOL> _USER_ID = '<STR_LIT:0>' <EOL> @ patch ( '<STR_LIT>' ) <EOL> class TokensApiPrintTokensForUserAndClientIdWithTokensTest ( <EOL> TokensApiPrintTokensTestBase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( TokensApiPrintTokensForUserAndClientIdWithTokensTest , <EOL> self ) . setUp ( ) <EOL> self . _client_id = '<STR_LIT>' <EOL> self . returned_token_doc = { <EOL> u'<STR_LIT>' : False , <EOL> u'<STR_LIT>' : u'<STR_LIT>' , <EOL> u'<STR_LIT>' : u'<STR_LIT>' , <EOL> u'<STR_LIT>' : u'<STR_LIT>' , <EOL> u'<STR_LIT>' : False , <EOL> u'<STR_LIT>' : [ u'<STR_LIT>' ] , <EOL> u'<STR_LIT>' : u'<STR_LIT>' } <EOL> def testBasicPrintSingleTokenForUserAndClientIdWithTokens ( <EOL> self , mock_get_token_request_fn ) : <EOL> mock_get_token_request_fn . return_value = self . returned_token_doc <EOL> self . _tokens_api . PrintTokenForUserClientId ( _USER_ID , self . _client_id , <EOL> long_list = False ) <EOL> self . assertEqual ( GetExpectedPrintOutput ( '<STR_LIT>' ) , <EOL> self . _new_stdout . print_messages ) <EOL> def testLongPrintSingleTokenForUserAndClientIdWithTokens ( <EOL> self , mock_get_token_request_fn ) : <EOL> mock_get_token_request_fn . return_value = self . returned_token_doc <EOL> self . _tokens_api . PrintTokenForUserClientId ( _USER_ID , self . _client_id , <EOL> long_list = True ) <EOL> self . assertEqual ( GetExpectedPrintOutput ( '<STR_LIT>' ) , <EOL> self . _new_stdout . print_messages ) <EOL> @ patch ( '<STR_LIT>' ) <EOL> class TokensApiPrintTokensForUserWithTokensTest ( <EOL> TokensApiPrintTokensTestBase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( TokensApiPrintTokensForUserWithTokensTest , self ) . setUp ( ) <EOL> self . returned_token_doc = LoadTestJsonFile ( <EOL> '<STR_LIT>' ) <EOL> def testBasicPrintTokensForUserWithTokens ( self , mock_list_tokens_request_fn ) : <EOL> mock_list_tokens_request_fn . return_value = self . returned_token_doc <EOL> self . _tokens_api . PrintTokensForUser ( _USER_ID , long_list = False ) <EOL> self . assertEqual ( GetExpectedPrintOutput ( '<STR_LIT>' ) , <EOL> self . _new_stdout . print_messages ) <EOL> def testLongPrintTokensForUserWithTokens ( <EOL> self , mock_list_tokens_request_fn ) : <EOL> mock_list_tokens_request_fn . return_value = self . returned_token_doc <EOL> self . _tokens_api . PrintTokensForUser ( _USER_ID , long_list = True ) <EOL> self . assertEqual ( GetExpectedPrintOutput ( '<STR_LIT>' ) , <EOL> self . _new_stdout . print_messages ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
