def test_load_partition(self): start_time = "2012-04-23 11:00" end_time = "2012-04-23 12:00" a = Babe().pull_kontagent(start_time, end_time, sample_mode=True) a = a.head(n=10) d = {} a.push(stream_dict=d, format="csv") self.assertEquals(list(d.keys()), ["2012-04-23_11"])
def test_load(self): start_time = '2012-04-23 11:00' end_time = '2012-04-23 12:00' a = Babe().pull_kontagent(start_time, end_time, sample_mode=True) buf = StringIO() a = a.head(n=10) a.push(stream=buf, format='csv') print buf.getvalue()
def test_load_partition(self): start_time = '2012-04-23 11:00' end_time = '2012-04-23 12:00' a = Babe().pull_kontagent(start_time, end_time, sample_mode=True) a = a.head(n=10) d = {} a.push(stream_dict=d, format='csv') self.assertEquals(list(d.keys()), ['2012-04-23_11'])
def test_buzzdata(self): a = Babe().pull(protocol='buzzdata', dataroom='best-city-contest-worldwide-cost-of-living-index', uuid='aINAPyLGur4y37yAyCM7w3', username='******', format='xls') a = a.head(2) buf = StringIO() a.push(stream=buf, format='csv')
def test_buzzdata(self): a = Babe().pull( protocol='buzzdata', dataroom='best-city-contest-worldwide-cost-of-living-index', uuid='aINAPyLGur4y37yAyCM7w3', username='******', format='xls') a = a.head(2) a.to_string()
def test_buzzdata(self): a = Babe().pull( protocol="buzzdata", dataroom="best-city-contest-worldwide-cost-of-living-index", uuid="aINAPyLGur4y37yAyCM7w3", username="******", format="xls", ) a = a.head(2) a.to_string()
def test_airport(self): a = Babe().pull(filename='data/airports.csv') a = a.primary_key_detect() a = a.head(n=10) a.to_string()
def test_load(self): start_time = "2012-04-23 11:00" end_time = "2012-04-23 12:00" a = Babe().pull_kontagent(start_time, end_time, sample_mode=True) a = a.head(n=10) print a.to_string()
def test_airport(self): a = Babe().pull(filename='data/airports.csv') a = a.primary_key_detect() a = a.head(n=10) buf = StringIO() a.push(stream=buf, format='csv')
def test_load(self): start_time = '2012-04-23 11:00' end_time = '2012-04-23 12:00' a = Babe().pull_kontagent(start_time, end_time, sample_mode=True) a = a.head(n=10) print a.to_string()