Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 def test_add(self,name):
     print "adding "+name
     subject = Subject()
     subject.description = name
     db.put(subject)
Exemplo n.º 3
0
 def test_add(self,cubmail):
     print "adding "+cubmail
     if not (self.test_exists(cubmail)):
         user = User(cubmail=cubmail, registered=1)
         db.put(user)
Exemplo n.º 4
0
 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)