(self, db)
| 122 | assert db.execute("SELECT COUNT(*) AS num FROM test").fetchone()["num"] == 1 |
| 123 | |
| 124 | def testUnsafePattern(self, db): |
| 125 | db.schema["maps"] = {"[A-Za-z.]*": db.schema["maps"]["data.json"]} # Only repetition of . supported |
| 126 | f = io.StringIO() |
| 127 | f.write(""" |
| 128 | { |
| 129 | "test": [ |
| 130 | {"test_id": 1, "title": "Test 1 title", "extra col": "Ignore it"} |
| 131 | ] |
| 132 | } |
| 133 | """) |
| 134 | f.seek(0) |
| 135 | assert db.updateJson(db.db_dir + "data.json", f) is False |
| 136 | assert db.execute("SELECT COUNT(*) AS num FROM test_importfilter").fetchone()["num"] == 0 |
| 137 | assert db.execute("SELECT COUNT(*) AS num FROM test").fetchone()["num"] == 0 |
nothing calls this directly
no test coverage detected