def test_eq_4(self):
     self.assertIsEqual(
         self.mount4,
         bind_mount_by_name('BAR', mount_type=MountType.DIRECTORY))
 def test_eq_2(self):
     self.assertIsEqual(
         self.mount2, bind_mount_by_name('BAR', mount_type=MountType.FILE))
 def test_eq_3(self):
     self.assertIsEqual(
         self.mount3,
         bind_mount_by_name('FOO', mount_type=MountType.DIRECTORY))
 def setUp(self):
     self.mount1 = bind_mount_by_name('FOO', mount_type=MountType.FILE)
     self.mount2 = bind_mount_by_name('BAR', mount_type=MountType.FILE)
     self.mount3 = bind_mount_by_name('FOO', mount_type=MountType.DIRECTORY)
     self.mount4 = bind_mount_by_name('BAR', mount_type=MountType.DIRECTORY)
 def test_eq_1(self):
     self.assertIsEqual(
         self.mount1, bind_mount_by_name('FOO', mount_type=MountType.FILE))
 def test_valid_error_1(self):
     self.assertValueError(
         lambda: bind_mount_by_name('adaf', MountType.FILE))
 def test_valid_error_2(self):
     self.assertTypeError(
         lambda: bind_mount_by_name(None, MountType.DIRECTORY))
 def test_type_error_4(self):
     self.assertTypeError(
         lambda: bind_mount_by_name(1, MountType.DIRECTORY))
 def test_type_error_5(self):
     self.assertTypeError(
         lambda: bind_mount_by_name(0.9661, MountType.FILE))
 def test_type_error_1(self):
     self.assertTypeError(lambda: bind_mount_by_name(True, MountType.FILE))
 def assert_invalid_env_name(self, name):
     with self.assertRaises(ValueError):
         bind_mount_by_name(name, MountType.FILE)
Esempio n. 12
0
 def requirements(self):
     return Require(
         bind_mount_by_name(
             'DATA_DIRECTORY_LOCATION',
             mount_type=MountType.DIRECTORY,
             description='The location for the data files of use case X'))
Esempio n. 13
0
 def requirements(self):
     return Require(bind_mount_by_name('FOO', MountType.DIRECTORY))
Esempio n. 14
0
 def requirements(self):
     return Require(bind_mount_by_name('FOO', MountType.FILE))