Added unit test to verify num vals in str_to_num

Added new unit test to verify that an int is of type numbers.Number
when an int is passed into translator.common.utils.str_to_num()

Change-Id: Ibce8a3c6fd60a337b39181ab1d9f3edc2ddc79a8
This commit is contained in:
Zach Sais 2015-04-22 11:41:31 -05:00 committed by Zachary Sais
parent 99739b10b4
commit 2e79dc5a88

View File

@ -66,3 +66,8 @@ class CommonUtilsTest(TestCase):
self.assertFalse(self.cmpUtils.compare_dicts(None, None))
self.assertFalse(self.cmpUtils.compare_dicts(None, {}))
self.assertFalse(self.cmpUtils.compare_dicts(None, {'x': '2'}))
def test_assert_value_is_num(self):
value = 1
output = translator.common.utils.str_to_num(value)
self.assertEqual(value, output)