Ejemplo n.º 1
0
    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]))
Ejemplo n.º 2
0
    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]))
Ejemplo n.º 3
0
    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]))
Ejemplo n.º 4
0
    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]))
Ejemplo n.º 5
0
    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]))
Ejemplo n.º 6
0
    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]))