def test_by_class(self): eq_(p('.class').xpath, 'p[has_word(@class, "class")]')
def test_by_multiple_attributes(self): eq_(p('.class', '#id', other='other').xpath, 'p[has_word(@class, "class")][@id="id"][@other="other"]')
def test_by_id(self): eq_(p('#id').xpath, 'p[@id="id"]')