def test_round_trip(self): t = HashName(Hash.TYPE_MD5) h = Hash(self.md5, t) hash2 = cybox.test.round_trip(h) self.assertEqual(hash2.simple_hash_value, self.md5) #TODO: make this really pass self.assertEqual(hash2.type_.value, t.value)
def test_is_plain_hashname(self): md5 = HashName("MD5") md5.xsi_type = "Some Other xsi:type" self.assertFalse(md5.is_plain())
def test_is_plain_hashname(self): md5 = HashName("MD5") self.assertTrue(md5.is_plain())