(self)
| 6814 | ) |
| 6815 | |
| 6816 | def test_schema_translate_map_sequence(self): |
| 6817 | s1 = schema.Sequence("s1") |
| 6818 | s2 = schema.Sequence("s2", schema="foo") |
| 6819 | s3 = schema.Sequence("s3", schema="bar") |
| 6820 | |
| 6821 | schema_translate_map = {None: "z", "bar": None, "foo": "bat"} |
| 6822 | |
| 6823 | self.assert_compile( |
| 6824 | schema.CreateSequence(s1), |
| 6825 | "CREATE SEQUENCE __[SCHEMA__none].s1", |
| 6826 | schema_translate_map=schema_translate_map, |
| 6827 | ) |
| 6828 | |
| 6829 | self.assert_compile( |
| 6830 | s1.next_value(), |
| 6831 | "<next sequence value: __[SCHEMA__none].s1>", |
| 6832 | schema_translate_map=schema_translate_map, |
| 6833 | dialect="default_enhanced", |
| 6834 | ) |
| 6835 | |
| 6836 | self.assert_compile( |
| 6837 | schema.CreateSequence(s2), |
| 6838 | "CREATE SEQUENCE __[SCHEMA_foo].s2", |
| 6839 | schema_translate_map=schema_translate_map, |
| 6840 | ) |
| 6841 | |
| 6842 | self.assert_compile( |
| 6843 | s2.next_value(), |
| 6844 | "<next sequence value: __[SCHEMA_foo].s2>", |
| 6845 | schema_translate_map=schema_translate_map, |
| 6846 | dialect="default_enhanced", |
| 6847 | ) |
| 6848 | |
| 6849 | self.assert_compile( |
| 6850 | schema.CreateSequence(s3), |
| 6851 | "CREATE SEQUENCE __[SCHEMA_bar].s3", |
| 6852 | schema_translate_map=schema_translate_map, |
| 6853 | ) |
| 6854 | |
| 6855 | self.assert_compile( |
| 6856 | s3.next_value(), |
| 6857 | "<next sequence value: __[SCHEMA_bar].s3>", |
| 6858 | schema_translate_map=schema_translate_map, |
| 6859 | dialect="default_enhanced", |
| 6860 | ) |
| 6861 | |
| 6862 | def test_schema_translate_map_sequence_server_default(self): |
| 6863 | s1 = schema.Sequence("s1") |
nothing calls this directly
no test coverage detected