I am trying to ensure integration with my django application from subversion using post commit commit.
I have a django test case (subclass unittest.TestCase) that (a) inserts a couple of records into a table, (b) spawns svn commit, (c) svn commit fires the hook that my django model uses to find information.
I am using sqlite3 db. The test does not use: memory: db, it uses a real file. I modified the django test code (to debug this problem) to avoid deleting the test db when it is finished, so I can check it.
The test model script model .MyModel.objects.all () and the entries are between (a) and (b).
When the hook fires in (c), it also unloads the model and there are no records. When I check db manually after running the test, there are no entries.
Is something happening in a django test environment that doesn't write to a db file?
To clarify : (d) completion of the test case. In this way, svn commit is committed before the test case is complete and before any django db cleanup code runs.
Additional information . I added a 15 second delay between (b) and (b) so that I could manually examine the db file in the middle of the test. Entries are not in the file.
source
share