예제 #1
0
  def testInsertWithAccountKey(self):
    TEST_USER_ID = 'testUserId'
    accountKey = GetAccountKey(TEST_USER_ID)
    act = Action(parent=accountKey)
    act.keywords = ['a', 'b', 'c']
    act.put()

    self.assertEquals(1, len(Action.query(ancestor=accountKey).fetch(2)))
예제 #2
0
파일: logic.py 프로젝트: thutupa/redirv2
def InsertAction(userId, phrase, link):
    act = Action(parent=GetAccountKey(userId))
    act.keywords = SplitPhrase(phrase)
    act.redirect_link = link
    return act.put()