OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Tests exercising chromiumsync and SyncDataModel.""" | 6 """Tests exercising chromiumsync and SyncDataModel.""" |
7 | 7 |
8 import pickle | 8 import pickle |
9 import unittest | 9 import unittest |
10 | 10 |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 version2) | 593 version2) |
594 | 594 |
595 # Ensure getting from timestamp 0 includes the folder. | 595 # Ensure getting from timestamp 0 includes the folder. |
596 version, changes, remaining = ( | 596 version, changes, remaining = ( |
597 self.GetChangesFromTimestamp([chromiumsync.BOOKMARK], 0)) | 597 self.GetChangesFromTimestamp([chromiumsync.BOOKMARK], 0)) |
598 self.assertEqual( | 598 self.assertEqual( |
599 self.ExpectedPermanentItemCount(chromiumsync.BOOKMARK), | 599 self.ExpectedPermanentItemCount(chromiumsync.BOOKMARK), |
600 len(changes)) | 600 len(changes)) |
601 self.assertEqual(version2, version) | 601 self.assertEqual(version2, version) |
602 | 602 |
| 603 def testGetKey(self): |
| 604 key1 = self.model.GetKey() |
| 605 key2 = self.model.GetKey() |
| 606 self.assertTrue(len(key1) > 0) |
| 607 self.assertEqual(key1, key2) |
| 608 |
603 | 609 |
604 if __name__ == '__main__': | 610 if __name__ == '__main__': |
605 unittest.main() | 611 unittest.main() |
OLD | NEW |