Пример #1
0
 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"])
Пример #2
0
 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()
Пример #3
0
 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'])
Пример #4
0
 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()
Пример #5
0
 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')
Пример #6
0
 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()
Пример #7
0
 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()
Пример #8
0
 def test_airport(self):
     a = Babe().pull(filename='data/airports.csv')
     a = a.primary_key_detect()
     a = a.head(n=10)
     a.to_string()
Пример #9
0
 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()
Пример #10
0
 def test_airport(self):
     a = Babe().pull(filename='data/airports.csv')
     a = a.primary_key_detect()
     a = a.head(n=10)
     a.to_string()
Пример #11
0
 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')
Пример #12
0
 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()
Пример #13
0
 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')