'Test parsing of font face rules'

def test_font_face(self):

    for (css, expected_declarations, expected_errors) in [(u'@font-face    {}', [], []), (u'@font-face    {    font-family:    Moose;    src:    url(font1.ttf)    }', [(u'font-family', [(u'IDENT', u'Moose')]), (u'src', [(u'URI', u'font1.ttf')])], [])]:
        stylesheet = CSSFonts3Parser().parse_stylesheet(css)
        self.assert_errors(stylesheet.errors, expected_errors)
        self.ae(len(stylesheet.rules), 1)
        rule = stylesheet.rules[0]
        self.ae(self.jsonify_declarations(rule), expected_declarations)
    stylesheet = CSSFonts3Parser().parse_stylesheet(u'@font-face;')
    self.assert_errors(stylesheet.errors, [u'missing    block'])
