Skip to content

Commit

Permalink
test: update plugin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YingtingChen committed Jul 19, 2024
1 parent 1e29263 commit 411985a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def test_save_clicked(self):
capture_method = capture_method.fetchall()[0][0]
self.assertEqual("Unknown", capture_method)
# suburb
sql = "SELECT suburb_4th FROM buildings_reference.suburb_locality WHERE suburb_locality_id = %s;"
sql = "SELECT name FROM buildings_reference.suburb_locality WHERE suburb_locality_id = %s;"
suburb = db._execute(sql, (result[2],))
suburb = suburb.fetchall()[0][0]
self.assertEqual("Hokowhitu", suburb)
Expand Down Expand Up @@ -515,7 +515,7 @@ def test_edit_mutiple_attributes(self):
capture_method = capture_method.fetchall()[0][0]
self.assertEqual("Unknown", capture_method)
# suburb
sql = "SELECT suburb_4th FROM buildings_reference.suburb_locality WHERE suburb_locality_id = %s;"
sql = "SELECT name FROM buildings_reference.suburb_locality WHERE suburb_locality_id = %s;"
suburb = db._execute(sql, (result[2],))
suburb = suburb.fetchall()[0][0]
self.assertEqual("Hokowhitu", suburb)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def test_save_clicked(self):
capture_method = capture_method.fetchall()[0][0]
self.assertEqual("Unknown", capture_method)
# suburb
sql = "SELECT suburb_4th FROM buildings_reference.suburb_locality WHERE suburb_locality_id = %s;"
sql = "SELECT name FROM buildings_reference.suburb_locality WHERE suburb_locality_id = %s;"
suburb = db._execute(sql, (result[2],))
suburb = suburb.fetchall()[0][0]
self.assertEqual("Hokowhitu", suburb)
Expand Down Expand Up @@ -311,7 +311,7 @@ def test_edit_mutiple_attributes(self):
capture_method = capture_method.fetchall()[0][0]
self.assertEqual("Unknown", capture_method)
# suburb
sql = "SELECT suburb_4th FROM buildings_reference.suburb_locality WHERE suburb_locality_id = %s;"
sql = "SELECT name FROM buildings_reference.suburb_locality WHERE suburb_locality_id = %s;"
suburb = db._execute(sql, (result[2],))
suburb = suburb.fetchall()[0][0]
self.assertEqual("Hokowhitu", suburb)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def tearDown(self):
# count_added = result.fetchone()[0]
# self.assertEqual(count_added, 1)
# # updated suburb locality
# sql_updated = "SELECT suburb_4th FROM buildings_reference.suburb_locality WHERE external_suburb_locality_id = 101;"
# sql_updated = "SELECT name FROM buildings_reference.suburb_locality WHERE external_suburb_locality_id = 101;"
# result = db._execute(sql_updated)
# name_updated = result.fetchone()[0]
# self.assertEqual(name_updated, "Kelburn North")
Expand Down

0 comments on commit 411985a

Please sign in to comment.