summaryrefslogtreecommitdiff
path: root/pycadf
diff options
context:
space:
mode:
authorbgsilva <bgsilva@us.ibm.com>2015-04-22 15:09:41 -0500
committerBaldemar Silva <bgsilva@us.ibm.com>2015-04-23 11:09:54 -0500
commit4d5b30966a00bd36cbdccdf128068568cb53dbc5 (patch)
treebd63e7fd55b368eb9e4b17197ec845ce26121021 /pycadf
parent9501f4f74c5d800ae43edbe52680e285cf98c710 (diff)
downloadpycadf-4d5b30966a00bd36cbdccdf128068568cb53dbc5.tar.gz
Add test to cover mask value for utils.mask_value
Added a test case to cover a non-string type as value into util.mask_value. The method will return the non-string value unmodified. Change-Id: I8f43d30a594ecddbc028d8b2321457f76ce838c0
Diffstat (limited to 'pycadf')
-rw-r--r--pycadf/tests/test_utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pycadf/tests/test_utils.py b/pycadf/tests/test_utils.py
index 8508bec..8f70312 100644
--- a/pycadf/tests/test_utils.py
+++ b/pycadf/tests/test_utils.py
@@ -28,3 +28,11 @@ class TestUtils(base.TestCase):
self.assertNotEqual(value[:visible + 1], obfuscate[:visible + 1])
self.assertEqual(value[-visible:], obfuscate[-visible:])
self.assertNotEqual(value[-visible - 1:], obfuscate[-visible - 1:])
+
+ def test_mask_value_nonstring(self):
+ value = 12
+
+ # If a non-string parameter is given to mask_value(), the non-string
+ # parameter is returned unmodified.
+ obfuscate = utils.mask_value(value)
+ self.assertEqual(value, obfuscate)