Exemplo n.º 1
0
    def test_is_display_True(self):
        valid_css_classes = ('display-small-down', 'medium-only', 'giant-up', 'display-720-up', 'display-369-down')
        names = ('display', 'display', 'display', 'display', 'display', )
        values = ('none', 'none', 'none', 'none', 'none', )

        for i, css_class in enumerate(valid_css_classes):
            css_property = Property(name=names[i], value=values[i], priority='')
            breakpoint_parser = BreakpointParser(css_class=css_class, css_property=css_property)
            self.assertTrue(breakpoint_parser.is_display(), msg=css_class)
Exemplo n.º 2
0
    def test_is_display_False(self):
        invalid_css_classes = (
            'inline-small-up', 'inline-giant-down', 'green-xxsmall-only', 'padding-10-large-up',
            'padding-25-820-up', 'margin-5-2-5-2-1000-up',
        )
        names = ('display', 'display', 'color', 'padding', 'padding', 'margin', )
        values = ('inline', 'inline', 'green', '10', '25', '5-2-5-2', )

        for i, css_class in enumerate(invalid_css_classes):
            css_property = Property(name=names[i], value=values[i], priority='')
            breakpoint_parser = BreakpointParser(css_class=css_class, css_property=css_property)
            self.assertFalse(breakpoint_parser.is_display(), msg=css_class)