summaryrefslogtreecommitdiffstats
path: root/test/test_lifescan.py
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2013-08-03 23:18:11 +0200
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2013-08-03 23:18:11 +0200
commit91fb2d40f286c1f3b0af9146d66d424f4e8c5c6d (patch)
treeedd37c7ac592944064f56330b2b8d6a30c368873 /test/test_lifescan.py
parentAdd support for checksum verification for the otultra2 driver. (diff)
downloadglucometerutils-91fb2d40f286c1f3b0af9146d66d424f4e8c5c6d.tar
glucometerutils-91fb2d40f286c1f3b0af9146d66d424f4e8c5c6d.tar.gz
glucometerutils-91fb2d40f286c1f3b0af9146d66d424f4e8c5c6d.tar.bz2
glucometerutils-91fb2d40f286c1f3b0af9146d66d424f4e8c5c6d.tar.lz
glucometerutils-91fb2d40f286c1f3b0af9146d66d424f4e8c5c6d.tar.xz
glucometerutils-91fb2d40f286c1f3b0af9146d66d424f4e8c5c6d.tar.zst
glucometerutils-91fb2d40f286c1f3b0af9146d66d424f4e8c5c6d.zip
Diffstat (limited to 'test/test_lifescan.py')
-rw-r--r--test/test_lifescan.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_lifescan.py b/test/test_lifescan.py
index 774567d..a7446e0 100644
--- a/test/test_lifescan.py
+++ b/test/test_lifescan.py
@@ -20,10 +20,11 @@ from glucometerutils import exceptions
class TestOTUltra2(unittest.TestCase):
def testChecksum(self):
checksum = lifescan_common.calculate_checksum(bytes('T', 'ascii'))
- self.assertEqual(0x5400, checksum)
+ self.assertEqual(0x0054, checksum)
- checksum = lifescan_common.calculate_checksum(bytes('TestString', 'ascii'))
- self.assertEqual(0x0643, checksum)
+ checksum = lifescan_common.calculate_checksum(
+ bytes('T "SAT","08/03/13","22:12:00 "', 'ascii'))
+ self.assertEqual(0x0608, checksum)
if __name__ == '__main__':
unittest.main()