Files
firefox/third_party/python/rsa/tests/test_compat.py
T
Andrew Halberstadt 7bb38413f2 Bug 1346025 - Move vendored python modules from /python to /third_party/python, r=ted
This commit is a simple 'hg mv' and does not contain any file modifications.

***
Bug 1346025 - Split vendored modules in python/moz.build to third_party/python/moz.build, r=ted

***
Bug 1346025 - Update references to moved python modules, r=ted

MozReview-Commit-ID: A12RnIFtXju
2017-05-25 11:48:03 -04:00

18 lines
452 B
Python

# -*- coding: utf-8 -*-
import unittest2
import struct
from rsa._compat import is_bytes, byte
class Test_byte(unittest2.TestCase):
def test_byte(self):
for i in range(256):
byt = byte(i)
self.assertTrue(is_bytes(byt))
self.assertEqual(ord(byt), i)
def test_raises_StructError_on_overflow(self):
self.assertRaises(struct.error, byte, 256)
self.assertRaises(struct.error, byte, -1)