def METHOD_NAME(self):
    if 'python_query' not in self.plugins:
        return
    plugin = self.plugins['python_query'].cls()
    self.failUnlessRaises(QueryPluginError, plugin.parse_body, None)
    self.failUnlessRaises(QueryPluginError, plugin.parse_body, '')
    self.failUnlessRaises(QueryPluginError, plugin.parse_body, '\\')
    self.failUnlessRaises(QueryPluginError, plugin.parse_body, 'unclosed[')
    self.failUnlessRaises(QueryPluginError, plugin.parse_body, 'return s')
    self.failUnless(plugin.parse_body('3'))
    self.failUnless(plugin.parse_body('s'))
    body1 = plugin.parse_body("s('~#rating') > 0.5")
    body2 = plugin.parse_body(
        "s('genre').lower()[2:] in ('rock', 'pop')")
    body3 = plugin.parse_body("len(s('title')) < 6")
    song1 = AudioFile({'title': 'foobar', '~#rating': 0.8,
                       'genre': 'jazz'})
    song2 = AudioFile({'title': 'baz', '~#rating': 0.4, 'genre': 'aapop'})
    self.failUnless(plugin.search(song1, body1))
    self.failIf(plugin.search(song1, body2))
    self.failIf(plugin.search(song1, body3))
    self.failIf(plugin.search(song2, body1))
    self.failUnless(plugin.search(song2, body2))
    self.failUnless(plugin.search(song2, body3))