(self)
| 119 | self.assertEqual(res, [['Meeting report (new)']]) |
| 120 | |
| 121 | async def test_sql_dml_insert_02(self): |
| 122 | # when columns are not specified, all columns are expected, |
| 123 | # in alphabetical order: |
| 124 | # id, __type__, owner, title |
| 125 | |
| 126 | await self.scon.execute("SET LOCAL allow_user_specified_id TO TRUE") |
| 127 | with self.assertRaisesRegex( |
| 128 | asyncpg.DataError, |
| 129 | "cannot assign to link '__type__': it is protected", |
| 130 | # TODO: positions are hard to recover since we don't even know which |
| 131 | # DML stmt this error is originating from |
| 132 | # position="30", |
| 133 | ): |
| 134 | await self.scon.execute( |
| 135 | ''' |
| 136 | INSERT INTO "Document" VALUES (NULL, NULL, NULL, 'Report') |
| 137 | ''' |
| 138 | ) |
| 139 | res = await self.squery_values('SELECT title FROM "Document"') |
| 140 | self.assertEqual(res, [['Report (new)']]) |
| 141 | |
| 142 | async def test_sql_dml_insert_03(self): |
| 143 | # multiple rows at once |
nothing calls this directly
no test coverage detected