(self)
| 325 | |
| 326 | # Explicit decoding prose test #1 |
| 327 | def test_decoding_1(self): |
| 328 | obj = Binary(self._hex_to_bytes("00112233445566778899AABBCCDDEEFF"), 4) |
| 329 | |
| 330 | # Case i: |
| 331 | self.assertEqual(obj.as_uuid(), self.uuid) |
| 332 | # Case ii: |
| 333 | self.assertEqual(obj.as_uuid(UuidRepresentation.STANDARD), self.uuid) |
| 334 | # Cases iii-vi: |
| 335 | for uuid_rep in ( |
| 336 | UuidRepresentation.JAVA_LEGACY, |
| 337 | UuidRepresentation.CSHARP_LEGACY, |
| 338 | UuidRepresentation.PYTHON_LEGACY, |
| 339 | ): |
| 340 | with self.assertRaises(ValueError): |
| 341 | obj.as_uuid(uuid_rep) |
| 342 | |
| 343 | def _test_decoding_legacy(self, hexstring, uuid_rep): |
| 344 | obj = Binary(self._hex_to_bytes(hexstring), 3) |
nothing calls this directly
no test coverage detected