This issue is intended for informational purposes, so I will close it after the comment.
Some of the tests (specifically test update and test timezone) may leave the database in a bad state if an error occurs while running the test.
The reason is that the test creates objects in the datastore for the test, and then deletes them after the test completes. If an error occurs, the test may not delete the datastore objects that it created. As a result, this may cause other tests to fail.
I have found a couple of solutions to this:
delete and reload the database (takes a long time)
edit the database using the admin address and datastore viewer page
Editing the database
In general, I have used the years 1978 and 1979 for tests for far
The test error message is usually something like: "multiple weeks found for 1978 week 5"
In the datastore viewer page:
list the Week entity, click the year tab (sort by year), and delete the objects with years 1978, 1979
list the Players entity, delete players with years 1978, 1979
Deleting players
You can delete players with certain years by going to the admin address, interactive console, and execute this code (substitute the year number you are deleting)
query = db.GqlQuery("SELECT * from Player WHERE years IN :year",year=[1979])
for q in query:
print q.name
db.delete(q)
Timezone test error
if an error occurs during the timezone test, then there may be some Game objects left in the datastore that will cause the games database test to fail. To fix this:
go to the admin address, datastore viewer
list the Games
click the number column
delete Games objects where the week number is None.
One more comment about test time. Whenever a test creates and delete datastore objects, this usually requires a long time to run. It took me about an hour to run all the tests.
This issue is intended for informational purposes, so I will close it after the comment.
Some of the tests (specifically test update and test timezone) may leave the database in a bad state if an error occurs while running the test.
The reason is that the test creates objects in the datastore for the test, and then deletes them after the test completes. If an error occurs, the test may not delete the datastore objects that it created. As a result, this may cause other tests to fail.
I have found a couple of solutions to this:
Editing the database
Deleting players You can delete players with certain years by going to the admin address, interactive console, and execute this code (substitute the year number you are deleting)
Timezone test error if an error occurs during the timezone test, then there may be some Game objects left in the datastore that will cause the games database test to fail. To fix this: