From 74bc4e820acf653d0d456106799f33e75a0eba43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Thu, 28 Dec 2017 14:05:13 +0000 Subject: test: use byte constants instead of encoding on the fly. --- test/test_otultra2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_otultra2.py b/test/test_otultra2.py index 5713987..9f18a85 100644 --- a/test/test_otultra2.py +++ b/test/test_otultra2.py @@ -22,12 +22,12 @@ from glucometerutils import exceptions class TestOTUltra2(parameterized.TestCase): def test_checksum(self): - checksum = otultra2._calculate_checksum(bytes('T', 'ascii')) + checksum = otultra2._calculate_checksum(b'T') self.assertEqual(0x0054, checksum) def test_checksum_full(self): checksum = otultra2._calculate_checksum( - bytes('T "SAT","08/03/13","22:12:00 "', 'ascii')) + b'T "SAT","08/03/13","22:12:00 "') self.assertEqual(0x0608, checksum) @parameterized.named_parameters( -- cgit v1.2.3