コード例 #1
0
ファイル: subject_test.py プロジェクト: akivab/WeSoSmart
 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
ファイル: subject_test.py プロジェクト: akivab/WeSoSmart
 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)