def test_find_by_id(self): user = users.User('*****@*****.**') creator = Creator(user = user) creator.put() creator.user_id = '4545' creator.put() creator_from_db = Creator.find_by_id('4545') self.assertEqual(creator_from_db.name,creator.name)
def get(self, user_id): user = Creator.find_by_id(user_id) self.render_template('user', dict(user = user, authdetails = utils.authdetails(user.url), creator = self.creator))