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)
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'))
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)