def test_builder_12(self):
     c = Require(self.prop3) & Forbid(self.prop1)
     self.assertEqual('[[-2], [1]]', str(c.cnf()))
     self.assertDictEqual({
         1: url_by_name('BAZ'),
         2: url_by_name('FOO')
     }, c.props)
 def test_builder_13(self):
     c = Require(self.prop3) & Require(self.prop2)
     self.assertEqual('[[1], [2]]', str(c.cnf()))
     self.assertDictEqual({
         1: url_by_name('BAZ'),
         2: url_by_name('BAR')
     }, c.props)
 def test_builder_23(self):
     c = Forbid(self.prop3) & Require(self.prop2) & Require(self.prop1)
     self.assertEqual('[[-1], [2], [3]]', str(c.cnf()))
     self.assertDictEqual(
         {
             1: url_by_name('BAZ'),
             2: url_by_name('BAR'),
             3: url_by_name('FOO')
         }, c.props)
 def test_builder_2(self):
     c = Any(
         Require(self.prop1) | Require(self.prop2) | Require(self.prop3))
     self.assertEqual('[[1, 2, 3]]', str(c.cnf()))
     self.assertDictEqual(
         {
             1: url_by_name('FOO'),
             2: url_by_name('BAR'),
             3: url_by_name('BAZ')
         }, c.props)
Ejemplo n.º 5
0
 def requirements(self) -> ConjunctionBuilder:
     return Any(
         Forbid(url_by_name('BAZ')) | Require(url_by_name('BAR'))
         | Forbid(url_by_name('BAM'))) & Require(
             url_by_name('FOO')) & Forbid(url_by_name('CAT'))
 def test_builder_1(self):
     c = Require(self.prop1)
     self.assertEqual('[[1]]', str(c.cnf()))
     self.assertDictEqual({1: url_by_name('FOO')}, c.props)
Ejemplo n.º 7
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'))
Ejemplo n.º 8
0
 def requirements(self) -> ConjunctionBuilder:
     return Require(url_by_name('FOO')) & Require(url_by_name('BAR'))
Ejemplo n.º 9
0
 def requirements(self):
     return Require(bind_mount_by_name('FOO', MountType.DIRECTORY))
Ejemplo n.º 10
0
 def requirements(self):
     return Require(bind_mount_by_name('FOO', MountType.FILE))
Ejemplo n.º 11
0
 def requirements(self):
     return Require(enum_by_name('FOO', choices=['VALUE1', 'VALUE2']))
Ejemplo n.º 12
0
 def requirements(self) -> ConjunctionBuilder:
     return Any(Require(url_by_name('FOO')))
Ejemplo n.º 13
0
 def requirements(self):
     return Require(
         self.source1) & Any(Require(self.source2)
                             | Require(self.source3)) & Forbid(
                                 self.forbidden)