Skip to content

Commit

Permalink
feat: add tests and tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
YingtingChen committed Oct 31, 2024
1 parent ffb2ff8 commit b1842f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion buildings/reference_data/topo50.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"protected_areas_polygons",
]

# URI = "srsname='EPSG:2193' typename='data.linz.govt.nz:layer-{0}-changeset' url=\"https://data.linz.govt.nz/services;key={1}/wfs/layer-{0}-changeset?viewparams=from:{2};to:{3}{4}\""
URI = "https://data.linz.govt.nz/services;key={1}/wfs/layer-{0}-changeset?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeNames=layer-{0}-changeset&viewparams=from:{2};to:{3}{4}&SRSNAME=EPSG:2193&outputFormat=json"


Expand Down
14 changes: 14 additions & 0 deletions buildings/tests/gui/test_setup_reference_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def test_disabled_on_start(self):
"""Test ui options disabled on opening as there is a current dataset"""
self.assertFalse(self.reference_frame.grbx_topo.isEnabled())
self.assertFalse(self.reference_frame.grbx_admin.isEnabled())
self.assertFalse(self.reference_frame.grbx_other.isEnabled())
self.assertFalse(self.reference_frame.chbx_canals.isEnabled())
self.assertFalse(self.reference_frame.chbx_lagoons.isEnabled())
self.assertFalse(self.reference_frame.chbx_lakes.isEnabled())
Expand All @@ -55,6 +56,7 @@ def test_disabled_on_start(self):
self.assertFalse(self.reference_frame.chbx_ta.isEnabled())
self.assertFalse(self.reference_frame.btn_update.isEnabled())
self.assertTrue(self.reference_frame.btn_exit.isEnabled())
self.assertTrue(self.reference_frame.btn_status.isEnabled())

def test_groupbx_check(self):
"""Check changing of group boxes changes the correct checkboxes"""
Expand Down Expand Up @@ -86,3 +88,15 @@ def test_groupbx_check(self):
self.reference_frame.grbx_admin.setChecked(False)
self.assertFalse(self.reference_frame.chbx_suburbs.isChecked())
self.assertFalse(self.reference_frame.chbx_ta.isChecked())
self.reference_frame.grbx_other.setChecked(True)
self.assertTrue(self.reference_frame.chbx_imagery.isChecked())
self.assertFalse(self.reference_frame.chbx_suburbs.isChecked())
self.assertFalse(self.reference_frame.chbx_ta.isChecked())
self.assertFalse(self.reference_frame.chbx_canals.isChecked())
self.assertFalse(self.reference_frame.chbx_lagoons.isChecked())
self.assertFalse(self.reference_frame.chbx_lakes.isChecked())
self.assertFalse(self.reference_frame.chbx_ponds.isChecked())
self.assertFalse(self.reference_frame.chbx_rivers.isChecked())
self.assertFalse(self.reference_frame.chbx_swamps.isChecked())
self.reference_frame.grbx_other.setChecked(False)
self.assertFalse(self.reference_frame.chbx_imagery.isChecked())

0 comments on commit b1842f0

Please sign in to comment.