コード例 #1
0
  def setUp(self):
    super(BinaryTest, self).setUp()

    self.blockable = test_utils.CreateBlockableEntity(binary_models.Binary)

    self.user = test_utils.CreateUser(email=_TEST_EMAIL)
    self.Login(self.user.email)
コード例 #2
0
 def testIsInstance(self):
   binary = test_utils.CreateBlockableEntity(binary_models.Binary)
   self.assertTrue(binary.IsInstance('Blockable'))
   self.assertTrue(binary.IsInstance('Binary'))
   self.assertFalse(binary.IsInstance('SomethingElse'))
コード例 #3
0
  def testCertId(self):
    cert = test_utils.CreateBlockableEntity(cert_models.Certificate)
    self.blockable.cert_key = cert.key
    self.blockable.put()

    self.assertEqual(cert.key.id(), self.blockable.cert_id)