Hello I'm using GAEUnit to develop an app for google appengine and am having a little trouble.<br><br>I'm trying to make a test as follows:<br><br>I have a file (say model.py) which contains Model.db model classes and some methods for accessing them. The methods are not part of the class.<br>
<br>In my test I can call model.save_person(person) which will call Person(name=person) and Person.put(). I can confirm this is being saved to the db (app engine db stub) by logging the result of Person.all() under the call to put.<br>
<br>What I want to do is create a method in model.py called get_people which will return Person.all().<br><br>If I do this the second test returns an empty result set. I think this is because the second test is not getting the same reference.<br>
<br>In my set up I'd like to set up a Person with details such as address, phone, preferences and have each test get the data for this person and test the result of some transformations.<br><br>I'd like to do this using the methods in my model.py class, and avoid importing the database to the test unit and using references to self.<br>
<br>
Am I approaching this correctly? How would I implement this?<br>
<br>Thanks for any assistance, I'm new to python and especially unittesting.<br>