diff py/test.py @ 299:358c50004679

merge
author Matt Johnston <matt@ucc.asn.au>
date Mon, 27 Feb 2017 23:20:07 +0800
parents 74c3ae4e3307
children
line wrap: on
line diff
--- a/py/test.py	Mon Feb 20 23:23:57 2017 +0800
+++ b/py/test.py	Mon Feb 27 23:20:07 2017 +0800
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.7
 import io
 
 import unittest
@@ -7,7 +6,7 @@
 
 class TestSensors(unittest.TestCase):
     def setUp(self):
-        self.sensors = sensor_ds18b20.DS18B20s(None)
+        self.sensors = sensor_ds18b20.SensorDS18B20(None)
 
     def test_sensors_regex(self):
         f1 = """6e 01 4b 46 7f ff 02 10 71 : crc=71 YES
@@ -66,9 +65,7 @@
         jsbuf = io.StringIO()
 
         self.params.overshoot_delay = 123
-        self.params.save(f=jsbuf)
-
-        s = jsbuf.getvalue()
+        s = self.params.save_string()
         self.assertTrue('"overshoot_delay": 123' in s, msg=s)
             
 unittest.main()