Why can't I see any data in the Google App Engine * Development * Developer Console?

I am launching a Google app application for apps in one of two ways ...

When I create objects using the application directly, the data is visible in the Development Console (DataStore view).

However, when I do unit tests ... even if they are successful , and I can put () and get () data, the data does not appear in the dataStore view. Any idea why I can't see my data? Although he is?

Notes:

  • I use GAEUnit for unit tests.
  • Mostly stored data consists of StringProperties ().
  • I use Python and run Django on top of GAE, I don't know if that matters.
+3
source share
2 answers

GAEUnit creates its own proxy server for the proxy server using this code on line 357 of current version 2.0a for django:

temp_stub = datastore_file_stub.DatastoreFileStub(
    'GAEUnitDataStore', None, None, trusted=True)

This proxy storage is only stored in memory, so it is deleted after the tests are completed. It is also empty when running tests, that is, it does not contain data that is currently in the default data store.

You can temporarily change this to write to a file in your development system, for example:

temp_stub = datastore_file_stub.DatastoreFileStub(
    'GAEUnitDataStore', '/path/to/gaeunit.datastore', None, trusted=True)

Then run dev_appserver.py on another port, for example:

dev_appserver.py --port=8081 --datastore_path=/path/to/gaeunit.datastore /path/to/application/

, , http://localhost:8081/_ah/admin , .

+2

, DataStore Dev Console , django? Django/GAE , dev-. dev- , django :

dev_appserver.py --datastore_path=/path/to/datastore/my_datastore --history_path=/path/to/datastore/my_datastore
+3

Source: https://habr.com/ru/post/1725133/


All Articles