def test_get_filestore_unsupported_platform(self):
     """Tests that get_filestore exceptions given a platform it doesn't
 support."""
     with mock.patch('config_utils.BaseConfig.platform',
                     return_value='other'):
         run_config = test_helpers.create_run_config()
         with self.assertRaises(filestore.FilestoreError):
             filestore_utils.get_filestore(run_config)
 def __init__(self, config, workspace):
     super().__init__(config, workspace)
     self.filestore = filestore_utils.get_filestore(self.config)
Example #3
0
 def test_get_filestore_unsupported_platform(self, _, __):
     """Tests that get_filestore exceptions given a platform it doesn't
 support."""
     run_config = test_helpers.create_run_config()
     with self.assertRaises(filestore.FilestoreError):
         filestore_utils.get_filestore(run_config)
Example #4
0
 def test_get_filestore(self, config_kwargs, filestore_cls):
     """Tests that get_filestore returns the right filestore given a certain
 platform."""
     run_config = test_helpers.create_run_config(**config_kwargs)
     filestore_impl = filestore_utils.get_filestore(run_config)
     self.assertIsInstance(filestore_impl, filestore_cls)