diff --git a/gluon/tests/test_utils.py b/gluon/tests/test_utils.py index cb4e6872..f38fe2e8 100644 --- a/gluon/tests/test_utils.py +++ b/gluon/tests/test_utils.py @@ -19,6 +19,18 @@ class TestUtils(unittest.TestCase): data = md5_hash("web2py rocks") self.assertEqual(data, '79509f3246a2824dee64635303e99204') + + def test_compare(self): + """ Tests the compare funciton """ + + a, b = 'test123', 'test123' + compare_result_true = compare(a, b) + self.assertTrue(compare_result_true) + + a, b = 'test123', 'test456' + compare_result_false = compare(a, b) + self.assertFalse(compare_result_false) + class TestPack(unittest.TestCase): """ Tests the compileapp.py module """