def test_modify(self, key): result = db.get(key) print "modifying "+result.cubmail+" with picture " result.picture = db.Blob(open("model/test.png","rb").read()) db.put(result)
def test_add(self,name): print "adding "+name subject = Subject() subject.description = name db.put(subject)
def test_add(self,cubmail): print "adding "+cubmail if not (self.test_exists(cubmail)): user = User(cubmail=cubmail, registered=1) db.put(user)
def test_modify(self,old_name,new_name): print "modifying "+old_name+" to "+new_name subjects = Subject.gql("WHERE description = :1", old_name) subject = subjects.get() subject.description = new_name db.put(subject)