test_backupdb: make the not-a-database file larger, since the older sqlite-2.3.2 on OS-X is easily fooled

This commit is contained in:
Brian Warner 2009-02-19 18:04:09 -07:00
parent 26fbe9df95
commit 9bc08158c6

View File

@ -28,7 +28,9 @@ class BackupDB(unittest.TestCase):
fileutil.make_dirs(basedir)
# put a non-DB file in the way
self.writeto("not-a-database", "I do not look like a sqlite database")
not_a_db = ("I do not look like a sqlite database\n" +
"I'M NOT" * 1000) # OS-X sqlite-2.3.2 takes some convincing
self.writeto("not-a-database", not_a_db)
stderr_f = StringIO()
bdb = backupdb.get_backupdb(os.path.join(basedir, "not-a-database"),
stderr_f)