示例#1
0
 def test_remove(self, name):
     print "removing "+name
     subjects = Subject.gql("WHERE description = :1", name)
     subject = subjects.get()
     try:
         db.delete(subject)
     except (Exception):
         print "can't find "+name+"\n"
示例#2
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)