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)))
def InsertAction(userId, phrase, link): act = Action(parent=GetAccountKey(userId)) act.keywords = SplitPhrase(phrase) act.redirect_link = link return act.put()