def test_with_blacklist_items(self): expected_pillows = {'CasePillow', 'XFormPillow', 'FakeConstructedPillowName', } configs_back = apply_pillow_actions_to_pillows([{'exclude_groups': ['phonelog']}], self.pillowtops) self.assertEqual(expected_pillows, set([c.name for c in configs_back]))
def test_no_blacklist_items(self): expected_pillows = {'CasePillow', 'XFormPillow', 'PhoneLogPillow', 'FakeConstructedPillowName', } configs_back = apply_pillow_actions_to_pillows([], self.pillowtops) self.assertEqual(expected_pillows, set([c.name for c in configs_back]))
def test_no_blacklist_items(self): expected_pillows = { 'CasePillow', 'XFormPillow', 'PhoneLogPillow', 'FakeConstructedPillowName', } configs_back = apply_pillow_actions_to_pillows([], self.pillowtops) self.assertEqual(expected_pillows, set([c.name for c in configs_back]))
def test_with_exclusion_by_class(self): expected_pillows = { 'CasePillow', 'XFormPillow', 'PhoneLogPillow', } configs_back = apply_pillow_actions_to_pillows([{ 'exclude_pillows': ['pillowtop.tests.FakeConstructedPillow'] }], self.pillowtops) self.assertEqual(expected_pillows, set([c.name for c in configs_back]))
def test_with_blacklist_items(self): expected_pillows = { 'CasePillow', 'XFormPillow', 'FakeConstructedPillowName', } configs_back = apply_pillow_actions_to_pillows([{ 'exclude_groups': ['phonelog'] }], self.pillowtops) self.assertEqual(expected_pillows, set([c.name for c in configs_back]))
def test_with_exclusion_by_class(self): expected_pillows = {'CasePillow', 'XFormPillow', 'PhoneLogPillow', } configs_back = apply_pillow_actions_to_pillows( [{'exclude_pillows': ['pillowtop.tests.FakeConstructedPillow']}], self.pillowtops ) self.assertEqual(expected_pillows, set([c.name for c in configs_back]))