コード例 #1
0
ファイル: test_stocks.py プロジェクト: maven135/pyEX
 def test_rightToPurchaseDF(self):
     from pyEX import rightToPurchaseDF
     with patch('requests.get') as mock, \
          patch('pickle.dump'):
         mock.return_value = MagicMock()
         mock.return_value.status_code = 200
         rightToPurchaseDF()
         rightToPurchaseDF(SYMBOL)
         rightToPurchaseDF(SYMBOL, 'test')
コード例 #2
0
ファイル: test_stocks.py プロジェクト: vkbrihma/pyEX
    def test_rightToPurchaseDF(self):
        from pyEX import rightToPurchaseDF

        with patch("requests.get") as mock, patch("pickle.dump"):
            mock.return_value = MagicMock()
            mock.return_value.status_code = 200
            rightToPurchaseDF()
            rightToPurchaseDF(SYMBOL)
            rightToPurchaseDF(SYMBOL, "test")