def setUpClass(self):
     make_test_databases.remove_existing_databases()
     make_test_databases.make_assignee_db()
     make_test_databases.make_inventor_db()
     self.conn = sqlite3.connect("hashTbl.sqlite3")
     self.cursor = self.conn.cursor()
     geocode_setup.create_sql_helper_functions(self.conn)
     geocode_setup.create_hashtbl(self.cursor, self.conn)
 def test_fix_city_country(self):
     make_test_databases.make_assignee_db()
     geocode_setup.fix_city_country(self.c)
     # Inspect loc table in hashTbl, find something to assert.
     rows = self.c.execute('select * from loc order by city').fetchall()
     element = rows[0][1]
     self.assertTrue('BERLIN'==element,"{0} should be {1}".format(element,'BERLIN'))
     element = rows[0][3]
     self.assertTrue('DE' == element,"{0} should be {1}".format(element,'DE'))
     element = rows[2][1]
     self.assertTrue('FAIRHAVEN' == element,"{0} should be {1}".format(element,'FAIRHAVEN'))
     element = rows[2][2]
     self.assertTrue('MA' == element,"{0} should be {1}".format(element,'MA'))
     pass