diff options
author | Ben <b-schaefer@posteo.de> | 2020-02-21 10:45:40 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.com> | 2020-03-08 00:36:39 +0100 |
commit | e72b02d84e7f67cdf6107862ad580e951a5bbda1 (patch) | |
tree | 0887513d2478f55b27abccfeb307f313231bd994 /test/test_td4277.py | |
parent | pre-commit guide in README (diff) | |
download | glucometerutils-e72b02d84e7f67cdf6107862ad580e951a5bbda1.tar glucometerutils-e72b02d84e7f67cdf6107862ad580e951a5bbda1.tar.gz glucometerutils-e72b02d84e7f67cdf6107862ad580e951a5bbda1.tar.bz2 glucometerutils-e72b02d84e7f67cdf6107862ad580e951a5bbda1.tar.lz glucometerutils-e72b02d84e7f67cdf6107862ad580e951a5bbda1.tar.xz glucometerutils-e72b02d84e7f67cdf6107862ad580e951a5bbda1.tar.zst glucometerutils-e72b02d84e7f67cdf6107862ad580e951a5bbda1.zip |
Diffstat (limited to 'test/test_td4277.py')
-rw-r--r-- | test/test_td4277.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/test/test_td4277.py b/test/test_td4277.py index 6f4ff9a..fbd4aa2 100644 --- a/test/test_td4277.py +++ b/test/test_td4277.py @@ -8,24 +8,21 @@ import datetime from absl.testing import parameterized - +from glucometerutils import exceptions from glucometerutils.drivers import td4277 from glucometerutils.support import lifescan -from glucometerutils import exceptions class TestTD4277Nexus(parameterized.TestCase): - @parameterized.parameters( - (b'\x21\x24\x0e\x15', datetime.datetime(2018, 1, 1, 21, 14)), - (b'\x21\x26\x0e\x15', datetime.datetime(2019, 1, 1, 21, 14)), - (b'\x04\x27\x25\x0d', datetime.datetime(2019, 8, 4, 13, 37)), + (b"\x21\x24\x0e\x15", datetime.datetime(2018, 1, 1, 21, 14)), + (b"\x21\x26\x0e\x15", datetime.datetime(2019, 1, 1, 21, 14)), + (b"\x04\x27\x25\x0d", datetime.datetime(2019, 8, 4, 13, 37)), ) def test_parse_datetime(self, message, date): - self.assertEqual(td4277._parse_datetime(message), - date) + self.assertEqual(td4277._parse_datetime(message), date) def test_making_message(self): self.assertEqual( - td4277._make_packet(0x22, 0), - b'\x51\x22\x00\x00\x00\x00\xa3\x16') + td4277._make_packet(0x22, 0), b"\x51\x22\x00\x00\x00\x00\xa3\x16" + ) |