diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_common.py | 16 | ||||
-rw-r--r-- | test/test_otultra2.py | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/test/test_common.py b/test/test_common.py index e7f1c0a..275fcf8 100644 --- a/test/test_common.py +++ b/test/test_common.py @@ -21,34 +21,34 @@ class TestCommon(unittest.TestCase): def setUp(self): pass - def testGlucoseConversion(self): + def test_glucose_conversion(self): self.assertEqual( - 5.56, common.ConvertGlucoseUnit( + 5.56, common.convert_glucose_unit( 100, common.UNIT_MGDL, common.UNIT_MMOLL)) self.assertEqual( - 5.56, common.ConvertGlucoseUnit( + 5.56, common.convert_glucose_unit( 100, common.UNIT_MGDL)) self.assertEqual( - 180, common.ConvertGlucoseUnit( + 180, common.convert_glucose_unit( 10, common.UNIT_MMOLL, common.UNIT_MGDL)) self.assertEqual( - 180, common.ConvertGlucoseUnit( + 180, common.convert_glucose_unit( 10, common.UNIT_MMOLL)) self.assertEqual( - 100, common.ConvertGlucoseUnit( + 100, common.convert_glucose_unit( 100, common.UNIT_MGDL, common.UNIT_MGDL)) self.assertEqual( - 10, common.ConvertGlucoseUnit( + 10, common.convert_glucose_unit( 10, common.UNIT_MMOLL, common.UNIT_MMOLL)) self.assertRaises( exceptions.InvalidGlucoseUnit, - common.ConvertGlucoseUnit, common.UNIT_MMOLL, 'foo') + common.convert_glucose_unit, common.UNIT_MMOLL, 'foo') if __name__ == '__main__': unittest.main() diff --git a/test/test_otultra2.py b/test/test_otultra2.py index ca65f99..ba577c3 100644 --- a/test/test_otultra2.py +++ b/test/test_otultra2.py @@ -31,26 +31,26 @@ class TestOTUltra2(unittest.TestCase): self.mock_readline.return_value = bytes('INVALID', 'ascii') self.assertRaises(otultra2.MissingChecksum, - self.device.GetSerialNumber) + self.device.get_serial_number) def testShortResponse(self): self.mock_readline.return_value = bytes('.\r', 'ascii') self.assertRaises(exceptions.InvalidResponse, - self.device.GetSerialNumber) + self.device.get_serial_number) def testInvalidResponse(self): self.mock_readline.return_value = bytes('% 1337\r', 'ascii') self.assertRaises(exceptions.InvalidResponse, - self.device.GetSerialNumber) + self.device.get_serial_number) def testInvalidSerialNumber(self): self.mock_readline.return_value = bytes( '@ "12345678O" 1337\r', 'ascii') self.assertRaises(otultra2.InvalidSerialNumber, - self.device.GetSerialNumber) + self.device.get_serial_number) if __name__ == '__main__': unittest.main() |