forked from bradw2k/form5500-data-sets-import
-
Notifications
You must be signed in to change notification settings - Fork 1
/
import_test.go
34 lines (28 loc) · 1014 Bytes
/
import_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
// import (
// "fmt"
// "testing"
// )
// func TestCreateTable(t *testing.T) {
// // Testing:
// // - downloading a file
// // - reading the file contents to determine columns to build a table
// // - build sql statements to drop if exists, and create table
// // - print description to console
// var expectation string
// name := "f_sch_c_part1_item1_%s_%s"
// section := "latest"
// year := "2013"
// tableName := fmt.Sprintf(name, year, section)
// sqlRunner := createTable(tableName, year, section)
// // expectation = utils.ReadAsset("test_examples/test_create_table.txt")
// if sqlRunner.Statement != expectation {
// expectation = fmt.Sprintf("Expected: %s, Got:", expectation)
// t.Error(expectation, sqlRunner.Statement)
// }
// expectation = "Creating table: f_sch_c_part1_item1_2013_latest"
// if sqlRunner.Description != expectation {
// expectation = fmt.Sprintf("Expected %s, Got:", expectation)
// t.Error(expectation, sqlRunner.Description)
// }
// }