summaryrefslogtreecommitdiffstats
path: root/test/test_otultraeasy.py
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2017-12-28 14:25:28 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2017-12-28 14:29:04 +0100
commitf3a3cf0660ba4d9477434805e5c5d3c2bfa52eb6 (patch)
treec01b66d8dc8803c654035a8094d6787a54d22906 /test/test_otultraeasy.py
parentFix up link to the site. (diff)
downloadglucometerutils-f3a3cf0660ba4d9477434805e5c5d3c2bfa52eb6.tar
glucometerutils-f3a3cf0660ba4d9477434805e5c5d3c2bfa52eb6.tar.gz
glucometerutils-f3a3cf0660ba4d9477434805e5c5d3c2bfa52eb6.tar.bz2
glucometerutils-f3a3cf0660ba4d9477434805e5c5d3c2bfa52eb6.tar.lz
glucometerutils-f3a3cf0660ba4d9477434805e5c5d3c2bfa52eb6.tar.xz
glucometerutils-f3a3cf0660ba4d9477434805e5c5d3c2bfa52eb6.tar.zst
glucometerutils-f3a3cf0660ba4d9477434805e5c5d3c2bfa52eb6.zip
Diffstat (limited to 'test/test_otultraeasy.py')
-rw-r--r--test/test_otultraeasy.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_otultraeasy.py b/test/test_otultraeasy.py
index 7b91d56..a1d4c02 100644
--- a/test/test_otultraeasy.py
+++ b/test/test_otultraeasy.py
@@ -3,15 +3,14 @@
__author__ = 'Diego Elio Pettenò'
__email__ = 'flameeyes@flameeyes.eu'
-__copyright__ = 'Copyright © 2013, Diego Elio Pettenò'
+__copyright__ = 'Copyright © 2013-2017, Diego Elio Pettenò'
__license__ = 'MIT'
import array
import os
import sys
import unittest
-
-import mock
+from unittest import mock
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
@@ -28,17 +27,18 @@ class TestOTUltraMini(unittest.TestCase):
self.device = otultraeasy.Device('mockdevice')
- def testCrc(self):
+ def test_crc(self):
self.assertEqual(
0x41cd,
lifescan.crc_ccitt(b'\x02\x06\x06\x03'))
+ def test_crc_array(self):
cmd_array = array.array('B', b'\x02\x06\x08\x03')
self.assertEqual(
0x62C2,
lifescan.crc_ccitt(cmd_array))
- def testPacketUpdateChecksum(self):
+ def test_packet_update_checksum(self):
packet = otultraeasy._Packet()
packet.build_command('')