def test_currval_escaped_schema_table_and_column(self): expr = currval(Column("the column", "the schema.the table")) statement = compile(expr) expected = """currval('"the schema"."the table_the column_seq"')""" self.assertEquals(statement, expected)
def test_currval_no_escaping(self): expr = currval(Column("thecolumn", "theschema.thetable")) statement = compile(expr) expected = """currval('theschema.thetable_thecolumn_seq')""" self.assertEquals(statement, expected)
def test_currval_escaped_column_no_schema(self): expr = currval(Column("the column", "thetable")) statement = compile(expr) expected = """currval('"thetable_the column_seq"')""" assert statement == expected