Exemplo n.º 1
0
 def test_get_all_drives(self):
     drive_conf = dict(DriveConfig.DEFAULT_VALUES)
     drive_conf['local_root'] = '/tmp'
     drive = drives.DriveObject(self.drive_root, get_data('drive.json'),
                                DriveConfig(drive_conf))
     self.drives_store.add_record(drive)
     for k, drive_value in self.drives_store.get_all_drives().items():
         drive_id, account_id, account_type = k
         self.assertEqual(drive_id, drive_value.drive_id)
         self.assertEqual(drive.drive_id, drive_value.drive_id)
         self.assertEqual(drive.config.local_root,
                          drive_value.config.local_root)
Exemplo n.º 2
0
 def setUp(self):
     self.data = {
         'http_retry_after_seconds': 40,
         'default_drive_config': DriveConfig(get_data('drive_config.json'))
     }
     self.user_conf = user_config.UserConfig(self.data)