Exemple #1
0
 def testUniqueKeyWithUpdateKeys(self):
     keys = ['key1', 'key2']
     util.unique_key('key1', keys, update_keys=True)
     self.assertEqual(['key1', 'key2', 'key1_1'], keys)
Exemple #2
0
 def testUniqueKey(self):
     self.assertEqual('key', util.unique_key('key', ['key1', 'key2']))
     self.assertEqual('key1_1', util.unique_key('key1', ['key1', 'key2']))
     self.assertEqual('key1_2', util.unique_key('key1', ['key1', 'key1_1']))