def test_pushpull(self): a = Babe().pull(stream=StringIO(self.s2), format='csv', primary_key='rown') a = a.typedetect() a.push_mongo(db='pybabe_test',collection='test_pushpull', drop_collection=True) b = Babe().pull_mongo(db="pybabe_test", fields=['rown', 'f', 's'], collection='test_pushpull') buf = StringIO() b.push(stream=buf, format='csv') self.assertEquals(buf.getvalue(), self.s2)
def test_pushpull(self): a = Babe().pull(stream=StringIO(self.s2), format='csv', primary_key='rown') a = a.typedetect() a.push_mongo(db='pybabe_test', collection='test_pushpull', drop_collection=True) b = Babe().pull_mongo(db="pybabe_test", fields=['rown', 'f', 's'], collection='test_pushpull') buf = StringIO() b.push(stream=buf, format='csv') self.assertEquals(buf.getvalue(), self.s2)
def test_pushpull(self): a = Babe().pull(string=self.s2, format="csv", primary_key="rown") a = a.typedetect() a.push_mongo(db="pybabe_test", collection="test_pushpull", drop_collection=True) b = Babe().pull_mongo(db="pybabe_test", fields=["rown", "f", "s"], collection="test_pushpull") self.assertEquals(b.to_string(), self.s2)
def test_push(self): a = Babe().pull(string=self.s1, format="csv", primary_key="rown") a = a.typedetect() a.push_mongo(db="pybabe_test", collection="test_push")
def test_push(self): a = Babe().pull(stream=StringIO(self.s1), format='csv', primary_key='rown') a = a.typedetect() a.push_mongo(db='pybabe_test', collection='test_push')
def test_push(self): a = Babe().pull(string=self.s1, format='csv', primary_key='rown') a = a.typedetect() a.push_mongo(db='pybabe_test',collection='test_push')
def test_pushpull(self): a = Babe().pull(string=self.s2, format='csv', primary_key='rown') a = a.typedetect() a.push_mongo(db='pybabe_test',collection='test_pushpull', drop_collection=True) b = Babe().pull_mongo(db="pybabe_test", fields=['rown', 'f', 's'], collection='test_pushpull') self.assertEquals(b.to_string(), self.s2)