From 05daa164ac54bbcad71e09cefa8d508c0b7c8dd4 Mon Sep 17 00:00:00 2001 From: BuhtigithuB Date: Sun, 15 Mar 2015 20:07:24 -0400 Subject: [PATCH] unittest test compare() --- gluon/tests/test_utils.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 """