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_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_1(self): c = Require( self.prop1) & Any(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)
def test_builder_1(self): c = Require(self.prop1) self.assertEqual('[[1]]', str(c.cnf())) self.assertDictEqual({1: url_by_name('FOO')}, c.props)