mirror of
				https://github.com/bspeice/metrik
				synced 2025-11-03 18:00:51 -05:00 
			
		
		
		
	Remove Histdata; too many nonces, not worth it
This commit is contained in:
		@ -1,32 +0,0 @@
 | 
			
		||||
from unittest import TestCase
 | 
			
		||||
from io import BytesIO
 | 
			
		||||
import pandas as pd
 | 
			
		||||
 | 
			
		||||
from metrik.tasks.histdata import HistDataWrapper
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class HistDataWrapperTest(TestCase):
 | 
			
		||||
 | 
			
		||||
    def test_eur_usd_july2016_bid(self):
 | 
			
		||||
        zip_content = HistDataWrapper.fetch_zip('EURUSD', 2016, 7, 'BID')
 | 
			
		||||
        assert len(zip_content.getvalue()) > 0
 | 
			
		||||
        csv_content = HistDataWrapper.fetch_csv(zip_content, 'EURUSD', 2016, 7, 'BID')
 | 
			
		||||
        assert len(csv_content.getvalue()) > 0
 | 
			
		||||
        content_dict = HistDataWrapper.parse_csv(csv_content)
 | 
			
		||||
        assert len(content_dict) > 0
 | 
			
		||||
 | 
			
		||||
    def test_usd_cad_july2016_bid(self):
 | 
			
		||||
        zip_content = HistDataWrapper.fetch_zip('USDCAD', 2016, 7, 'BID')
 | 
			
		||||
        assert len(zip_content.getvalue()) > 0
 | 
			
		||||
        csv_content = HistDataWrapper.fetch_csv(zip_content, 'USDCAD', 2016, 7, 'BID')
 | 
			
		||||
        assert len(csv_content.getvalue()) > 0
 | 
			
		||||
        content_dict = HistDataWrapper.parse_csv(csv_content)
 | 
			
		||||
        assert len(content_dict) > 0
 | 
			
		||||
 | 
			
		||||
    def test_eur_usd_july2016_ask(self):
 | 
			
		||||
        zip_content = HistDataWrapper.fetch_zip('EURUSD', 2016, 7, 'ASK')
 | 
			
		||||
        assert len(zip_content.getvalue()) > 0
 | 
			
		||||
        csv_content = HistDataWrapper.fetch_csv(zip_content, 'EURUSD', 2016, 7, 'ASK')
 | 
			
		||||
        assert len(csv_content.getvalue()) > 0
 | 
			
		||||
        content_dict = HistDataWrapper.parse_csv(csv_content)
 | 
			
		||||
        assert len(content_dict) > 0
 | 
			
		||||
		Reference in New Issue
	
	Block a user