From 9eabc14b7c07369678fda35d9037a032e2be0bfe Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Tue, 8 May 2018 17:41:27 -0700 Subject: [PATCH] add model tests --- tests/test_models.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 tests/test_models.py diff --git a/tests/test_models.py b/tests/test_models.py new file mode 100755 index 0000000..7f3c07c --- /dev/null +++ b/tests/test_models.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +import unittest +import util + + +class TestModels(unittest.TestCase): + def runTest(self): + # modelNames + modelNames = util.invoke('modelNames') + self.assertGreater(len(modelNames), 0) + + # modelNamesAndIds + modelNamesAndIds = util.invoke('modelNamesAndIds') + self.assertGreater(len(modelNames), 0) + + # modelFieldNames + modelFields = util.invoke('modelFieldNames', modelName=modelNames[0]) + + # modelFieldsOnTemplates + modelFieldsOnTemplates = util.invoke('modelFieldsOnTemplates', modelName=modelNames[0]) + + +if __name__ == '__main__': + unittest.main()