def make_volume_options_tests(make_options, extra_arguments=None):
 if (extra_arguments is None):
  extra_arguments = []
 def parseOptions(options, argv):
  options.parseOptions((argv + extra_arguments))
 class VolumeOptionsTests(TestCase, ):
  '\n        Tests for ``Options`` subclasses decorated with\n        ``flocker_volume_options``.\n        '
  def test_default_config(self):
   "\n            By default the config file is ``b'/etc/flocker/volume.json'``.\n            "
   options = make_options()
   parseOptions(options, [])
   self.assertEqual(FilePath('/etc/flocker/volume.json'), options['config'])
  def test_config(self):
   '\n            The options class accepts a ``--config`` parameter.\n            '
   path = '/foo/bar'
   options = make_options()
   parseOptions(options, ['--config', path])
   self.assertEqual(FilePath(path), options['config'])
  def test_pool(self):
   '\n            The options class accepts a ``--pool`` parameter.\n            '
   pool = 'foo-bar'
   options = make_options()
   parseOptions(options, ['--pool', pool])
   self.assertEqual(pool, options['pool'])
  def test_mountpoint(self):
   '\n            The options class accepts a ``--mountpoint`` parameter.\n            '
   mountpoint = '/bar/baz'
   options = make_options()
   parseOptions(options, ['--mountpoint', mountpoint])
   self.assertEqual(mountpoint, options['mountpoint'])
 dummy_options = make_options()
 VolumeOptionsTests.__name__ = (dummy_options.__class__.__name__ + 'Tests')
 return VolumeOptionsTests

def make_volume_options_tests ( make_options , extra_arguments = None ) : if ( extra_arguments is None ) : extra_arguments = [ ] def parseOptions ( options , argv ) : options . parseOptions ( ( argv + extra_arguments ) ) class VolumeOptionsTests ( TestCase , ) : def test_default_config ( self ) : options = make_options ( ) parseOptions ( options , [ ] ) self . assertEqual ( FilePath ( '/etc/flocker/volume.json' ) , options [ 'config' ] ) def test_config ( self ) : path = '/foo/bar' options = make_options ( ) parseOptions ( options , [ '--config' , path ] ) self . assertEqual ( FilePath ( path ) , options [ 'config' ] ) def test_pool ( self ) : pool = 'foo-bar' options = make_options ( ) parseOptions ( options , [ '--pool' , pool ] ) self . assertEqual ( pool , options [ 'pool' ] ) def test_mountpoint ( self ) : mountpoint = '/bar/baz' options = make_options ( ) parseOptions ( options , [ '--mountpoint' , mountpoint ] ) self . assertEqual ( mountpoint , options [ 'mountpoint' ] ) dummy_options = make_options ( ) VolumeOptionsTests . __name__ = ( dummy_options . __class__ . __name__ + 'Tests' ) return VolumeOptionsTests
make a testcase to test the volumeservice specific arguments added to an options class by the flocker_volume_options class decorator .