(db)
| 49 | + " (%s, %s, %s)", (item_type, enum_attr_id, enum_value_id)) |
| 50 | |
| 51 | def doDbChecks(db): |
| 52 | cur = db.cursor() |
| 53 | cur.execute("SELECT COUNT(*) FROM ITEM_TYPE") |
| 54 | rows = cur.fetchall() |
| 55 | if rows[0][0] != 0: |
| 56 | print "ITEM_TYPE table was not empty, it had", rows[0][0], 'rows' |
| 57 | doExitBecauseDbNotEmpty() |
| 58 | cur = db.cursor() |
| 59 | cur.execute("SELECT COUNT(*) FROM ITEM_ATTR") |
| 60 | rows = cur.fetchall() |
| 61 | if rows[0][0] != 0: |
| 62 | print "ITEM_ATTR table was not empty, it had", rows[0][0], 'rows' |
| 63 | doExitBecauseDbNotEmpty() |
| 64 | cur = db.cursor() |
| 65 | cur.execute("SELECT COUNT(*) FROM ITEM_ATTR_ENUM") |
| 66 | rows = cur.fetchall() |
| 67 | if rows[0][0] !=0: |
| 68 | print "ITEM_ATTR_ENUM table was not empty, it had", rows[0][0], 'rows' |
| 69 | doExitBecauseDbNotEmpty() |
| 70 | cur = db.cursor() |
| 71 | cur.execute("SELECT COUNT(*) FROM DIMENSION") |
| 72 | rows = cur.fetchall() |
| 73 | if rows[0][0] !=0: |
| 74 | print "DIMENSION table was not empty, it had", rows[0][0], 'rows' |
| 75 | doExitBecauseDbNotEmpty() |
| 76 | |
| 77 | |
| 78 | def doExitBecauseDbNotEmpty(): |
no test coverage detected