SQLite requires a limit clause for offset to work.
(self)
| 45 | |
| 46 | @sqlite_only |
| 47 | def test_offset_sqlite(self): |
| 48 | """ |
| 49 | SQLite requires a limit clause for offset to work. |
| 50 | """ |
| 51 | self.insert_rows() |
| 52 | query = Band.objects().order_by(Band.name).offset(1) |
| 53 | |
| 54 | with self.assertRaises(ValueError): |
| 55 | query.run_sync() |
| 56 | |
| 57 | query = query.limit(5) |
| 58 | |
| 59 | response = query.run_sync() |
| 60 | |
| 61 | self.assertEqual( |
| 62 | [i.name for i in response], ["Pythonistas", "Rustaceans"] |
| 63 | ) |
| 64 | |
| 65 | |
| 66 | class TestGet(DBTestCase): |
nothing calls this directly
no test coverage detected