<s> import mock <EOL> from storyboardclient . tests import base as test_base <EOL> from storyboardclient . v1 import users <EOL> class UserTestCase ( test_base . TestCase ) : <EOL> @ mock . patch ( <EOL> "<STR_LIT>" <EOL> ) <EOL> def test_user_list_tokens ( self , mock_private_list ) : <EOL> user = users . User ( manager = mock . MagicMock ( ) , info = { "<STR_LIT:id>" : "<STR_LIT>" } ) <EOL> user . user_tokens . list ( ) <EOL> mock_private_list . assert_called_once_with ( <EOL> "<STR_LIT>" , None ) <EOL> @ mock . patch ( <EOL> "<STR_LIT>" <EOL> ) <EOL> def test_user_create_token ( self , mock_private_post ) : <EOL> user = users . User ( manager = mock . MagicMock ( ) , info = { "<STR_LIT:id>" : "<STR_LIT>" } ) <EOL> user . user_tokens . create ( expires_in = <NUM_LIT> , user_id = "<STR_LIT>" ) <EOL> mock_private_post . assert_called_once_with ( <EOL> "<STR_LIT>" , <EOL> { "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT>" : "<STR_LIT>" } ) <EOL> @ mock . patch ( "<STR_LIT>" ) <EOL> def test_user_update_token ( self , mock_private_put ) : <EOL> user = users . User ( manager = mock . MagicMock ( ) , info = { "<STR_LIT:id>" : "<STR_LIT>" } ) <EOL> user . user_tokens . update ( id = "<STR_LIT>" , expires_in = <NUM_LIT> ) <EOL> mock_private_put . assert_called_once_with ( <EOL> "<STR_LIT>" , <EOL> { "<STR_LIT>" : <NUM_LIT> } ) </s>
