Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Side by Side Diff: net/tools/testserver/chromiumsync_test.py

Issue 10455012: [Sync] Add support for performing a GetKey on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fred's comments Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698