Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / docs / server2 / docs_server_utils_test.py
blobfd4539c3ad37851086d87dc222b9a91ca527efd4
1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 import unittest
8 from docs_server_utils import StringIdentity
11 class DocsServerUtilsTest(unittest.TestCase):
12 '''Tests for methods in docs_server_utils.
13 '''
15 # TODO(kalman): There are a bunch of methods in docs_server_utils.
16 # Test them all.
18 def testStringIdentity(self):
19 # The important part really is that these are all different.
20 self.assertEqual('C+7Hteo/', StringIdentity('foo'))
21 self.assertEqual('Ys23Ag/5', StringIdentity('bar'))
22 self.assertEqual('T5FOBOjX', StringIdentity('foo', 'bar'))
23 self.assertEqual('K7XzI1GD', StringIdentity('bar', 'foo'))
24 self.assertEqual('CXypceHn', StringIdentity('foo', 'bar', 'baz'))
25 self.assertEqual('gGo0GTF6', StringIdentity('foo', 'baz', 'bar'))
28 if __name__ == '__main__':
29 unittest.main()