'verify that invalid expressions are refused, even for magic fields'

@mute_logger('odoo.sql_db')
def test_invalid(self):

    Country = self.env['res.country']
    with self.assertRaises(ValueError):
        Country.search([('does_not_exist', '=', 'foo')])
    with self.assertRaises(ValueError):
        Country.search([('create_date', '>>', 'foo')])
    with self.assertRaises(psycopg2.DataError):
        Country.search([('create_date', '=', "1970-01-01');    --")])
