def test_data_load_with_header(self): flatfile = FlatFile(self.Donkey, "people", "tests/new_people_with_header.csv") flatfile.load() result = self.session.query(self.Donkey.get_class("people")).filter_by(name = u"popph15").first() assert 1500 in [a.amount for a in result.donkey_sponsership]
def data_load_from_file(application, job_id, **kw): table = kw.get("table") file = kw.get("file") flatfile = FlatFile(application.database, table, util.get_dir(file)) messager = Messager(application, job_id) return flatfile.load(messager = messager)