Пример #1
0
    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)
Пример #2
0
 def test_is_plain_hashname(self):
     md5 = HashName("MD5")
     md5.xsi_type = "Some Other xsi:type"
     self.assertFalse(md5.is_plain())
Пример #3
0
 def test_is_plain_hashname(self):
     md5 = HashName("MD5")
     self.assertTrue(md5.is_plain())
Пример #4
0
 def test_is_plain_hashname(self):
     md5 = HashName("MD5")
     md5.xsi_type = "Some Other xsi:type"
     self.assertFalse(md5.is_plain())
Пример #5
0
 def test_is_plain_hashname(self):
     md5 = HashName("MD5")
     self.assertTrue(md5.is_plain())