Jon Salz | 8baad8b | 2013-03-11 20:01:45 +0800 | [diff] [blame^] | 1 | #!/usr/bin/python |
| 2 | # pylint: disable=W0212 |
| 3 | # |
| 4 | # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
| 5 | # Use of this source code is governed by a BSD-style license that can be |
| 6 | # found in the LICENSE file. |
| 7 | |
| 8 | import unittest2 |
| 9 | |
| 10 | import factory_common # pylint: disable=W0611 |
| 11 | from cros.factory import privacy |
| 12 | |
| 13 | class PrivacyTest(unittest2.TestCase): |
| 14 | def testFilterDict(self): |
| 15 | self.assertEquals( |
| 16 | dict(a='A', b='B', |
| 17 | ubind_attribute='<redacted 1 chars>', |
| 18 | gbind_attribute='<redacted 2 chars>'), |
| 19 | privacy.FilterDict( |
| 20 | dict(a='A', b='B', ubind_attribute='U', gbind_attribute='GG'))) |
| 21 | |
| 22 | if __name__ == '__main__': |
| 23 | unittest2.main() |