예제 #1
0
 def test_build_key_method(self):
     newk = QuizAttempt.build_key(1)
     from google.appengine.ext import ndb
     self.assertTrue(isinstance(newk, ndb.Key))
예제 #2
0
 def test_create_quiz_takes_user_id_and_quiz_type(self):
     QuizAttempt.create(1, 'short_a')
     my_key = QuizAttempt.build_key(1, 'short_a')
     self.assertEqual('short_a', my_key.get().quiz_type)