Skip to content
Snippets Groups Projects
Commit fabee4b2 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add unittest for utils._FingerprintFile


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent d5cd389c
No related branches found
No related tags found
No related merge requests found
......@@ -1054,6 +1054,19 @@ class TestFormatTime(unittest.TestCase):
FormatTime(int(time.time()))
class TestFingerprintFile(unittest.TestCase):
def setUp(self):
self.tmpfile = tempfile.NamedTemporaryFile()
def test(self):
self.assertEqual(utils._FingerprintFile(self.tmpfile.name),
"da39a3ee5e6b4b0d3255bfef95601890afd80709")
utils.WriteFile(self.tmpfile.name, data="Hello World\n")
self.assertEqual(utils._FingerprintFile(self.tmpfile.name),
"648a6a6ffffdaa0badb23b8baf90b6168dd16b3a")
class TestUnescapeAndSplit(unittest.TestCase):
"""Testing case for UnescapeAndSplit"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment