def test_load_from_url(self): tasks.load_from_url(self.dsn, self.cra_url) package = data_manager.package(self.dsn) sources = list(package.all(Source)) assert len(sources) == 1, sources src0 = sources[0] assert src0.meta['name'] == 'cra.csv', src0.meta.items()
def csvimport(**args): """ Load a CSV dataset """ model = get_model(args['model']) dataset = get_or_create_dataset(model) load_from_url(dataset, args['data_url'])