def test_accept_wellformed_must_validate(self): match = ACCEPT.match('text/plain') self.assertNotEqual( match, None, "ACCEPT wellformed must validate" )
def test_accept_without_subtype_must_not_validate(self): match = ACCEPT.match('text') self.assertEqual( match, None, "ACCEPT without subtype must not validate" )
def test_accept_without_semicolon_must_not_validate(self): match = ACCEPT.match('text/x-dvi q=0.8') self.assertEqual( match, None, "ACCEPT without semicolon must not be valid" )
def test_empty_accept_must_not_validate(self): match = ACCEPT.match('') self.assertEqual( match, None, "ACCEPT must not validate if it is empty" )
def test_accept_must_validate_with_plus_symbols(self): match = ACCEPT.match('text/xhtml+xml') self.assertNotEqual( match, None, "ACCEPT must validate with plus symbols" )
def test_accept_multiple_types(self): match = ACCEPT.match('text/plain; q=0.8, xml/plain') self.assertNotEqual( match, None, "ACCEPT must validate with multiple types" )