'element list contains right information about query and raises nice exception message'

def test_element_list_contains_right_information_and_raises_right_exception(self):

    with self.assertRaises(ElementDoesNotExist) as cm:
        element_list = self.browser.find_by_css('.element-that-dont-exists')
        self.assertEqual('css', element_list.find_by)
        self.assertEqual('.element-that-dont-exists', element_list.query)
        element_list.first
    expected_message = 'no    elements    could    be    found    with    css    ".element-that-dont-exists"'
    e = cm.exception
    self.assertEqual(expected_message, e.args[0])
