Skip to content

Instantly share code, notes, and snippets.

@scw
Created July 2, 2013 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scw/5906271 to your computer and use it in GitHub Desktop.
Save scw/5906271 to your computer and use it in GitHub Desktop.
# this test should be run after a fresh run of makeaddin to rebuild the .esriaddin file.
class TestAddin(unittest.TestCase):
def setUp(self):
self.addin_path = os.sep.join([local_path, '..', '..', 'btm.esriaddin'])
self.addin_zip = zipfile.ZipFile(self.addin_path, 'r')
def testToolboxIsPresent(self):
toolbox_path = 'Install/toolbox/btm.pyt'
self.assertTrue(toolbox_path in self.addin_zip.namelist())
def testModelNameIsValid(self):
""" the signing process changes names to to URL encoded; make sure
our model remains invariant."""
model_name = 'Install/toolbox/btm_model.tbx'
self.assertTrue(model_name in self.addin_zip.namelist())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment