Commit ed6c77d5 authored by Jérome Perrin's avatar Jérome Perrin

test: fix a strange assertion on test_slapproxy

This test was probably asserting that initial state was OK
parent 3483561d
......@@ -1387,9 +1387,10 @@ class TestMigrateVersion10To12(TestInformation, TestRequest, TestSlaveRequest, T
self.db.commit()
def test_automatic_migration(self):
table_list = ('software12', 'computer12', 'partition12', 'slave12', 'partition_network12')
for table in table_list:
self.assertRaises(sqlite3.OperationalError, self.db.execute, "SELECT name FROM computer12")
# Make sure that in the initial state we only have version 10 of the tables.
table_list = self.db.execute("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name").fetchall()
self.assertEqual(table_list, [('computer10', ), ('partition10', ), ('partition_network10', ), ('slave10', ), ('software10', )])
# Run a dummy request to cause migration
self.app.get('/getComputerInformation?computer_id=computer')
......
  • yes, I think you're correct. The test was doing "check that no version12 of tables exist" (and it was badly implemented because it was not using table variable). And now you are doing "check that only version 10 of tables exist" which is even better

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment