def test_get_data_statistics(): file_id = "test001" res = fm.get_data_statistics(file_id) expected = { 'n_classes': 3, 'statistics': {' nameA': 2, ' nameB': 1, ' nameC': 1}} eq_(res, expected)
def finished(d): uploading_file = d["uploading_file"] file_id = fm.generate_id() result = fm.put_zip_file(uploading_file, file_id, is_expanding=True) info = fm.get_data_statistics(file_id) info["name"] = d["name"] info["description"] = d["description"] res = fm.put_data_info(info, file_id) res["action"] = "uploaded" return res
def test_get_data_statistics(): file_id = "not_exist_id" res = fm.get_data_statistics(file_id) eq_(res, {})