def test_accounts(self): from tdameritrade import TDClient tdc = TDClient('test', [1, 2]) with patch('requests.get') as m: m.return_value.status_code = 200 m.return_value.json.return_value = [MagicMock()] tdc.accounts() tdc = TDClient('test', [1, 2]) with patch('requests.get') as m: m.return_value.status_code = 200 m.return_value.json.return_value = [MagicMock()] with patch('requests.get') as m: m.return_value.status_code = 200 m.return_value.json.return_value = [{'test': 1, 'test2': 2}] tdc.accountsDF()
def test_accounts(self, mock_rtie): from tdameritrade import TDClient tdc = TDClient(clientId=123, refreshToken='reftoken', accountIds=[1, 2]) with patch('requests.get') as m: m.return_value.status_code = 200 m.return_value.json.return_value = [MagicMock()] tdc.accounts() tdc = TDClient(clientId=123, refreshToken='reftoken', accountIds=[1, 2]) with patch('requests.get') as m: m.return_value.status_code = 200 m.return_value.json.return_value = [MagicMock()] with patch('requests.get') as m: m.return_value.status_code = 200 m.return_value.json.return_value = [{'test': 1, 'test2': 2}] tdc.accountsDF()