2👍
GAEUnit creates its own proxy stub datastore, using this code on line 357 of the current ‘2.0a for django’ release:
temp_stub = datastore_file_stub.DatastoreFileStub(
'GAEUnitDataStore', None, None, trusted=True)
This proxy datastore is only held in memory, so is deleted once the tests finish running. It is also empty when the tests start running, ie it does not contain any data currently in the default development datastore.
You can temporarily modify this to make it write to a file on your development system, eg:
temp_stub = datastore_file_stub.DatastoreFileStub(
'GAEUnitDataStore', '/path/to/gaeunit.datastore', None, trusted=True)
Then run dev_appserver.py on a different port, eg:
dev_appserver.py --port=8081 --datastore_path=/path/to/gaeunit.datastore /path/to/application/
And then finally, open http://localhost:8081/_ah/admin
in a browser to view the contents of the temporary datastore.
3👍
Is there a chance your Dev Console DataStore view is looking at a different datastore than your django app is writing to? I had a similar issue with my Django/GAE setup and resolved it by explicitly saying the location of my datastore when starting up the dev server. To start the dev server this way, just go into the directory of your django project and type:
dev_appserver.py --datastore_path=/path/to/datastore/my_datastore --history_path=/path/to/datastore/my_datastore
- [Django]-Django on Aptana Studio 3.0
- [Django]-Upload image and string via HTTP POST windows phone 8.1 with HttpClient
- [Django]-Django unit test; Login using python-social-auth
- [Django]-Validation Error with Multiple File Uploads in Django via Ajax
- [Django]-Formatting Time Django Template