summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2010-10-09 18:21:01 +0200
committerYuval Adam <yuv.adm@gmail.com>2010-10-09 18:21:01 +0200
commitafcf76adfacf6ffbbdc92e9ec94db111d6e6b54f (patch)
tree93e8683765ca8fbb67a043cb317b70336aa4f685
parent02d18c084cd769a620b5845cf536f91a2dde950b (diff)
added sensors unit tests
-rw-r--r--sensors.py2
-rw-r--r--sensors_test.py12
2 files changed, 13 insertions, 1 deletions
diff --git a/sensors.py b/sensors.py
index d096548..2d06675 100644
--- a/sensors.py
+++ b/sensors.py
@@ -1,5 +1,5 @@
-def get_sensor_list():
+def get_sensors():
dict = {}
from csv import reader
with open('dtslist.csv', 'r') as f:
diff --git a/sensors_test.py b/sensors_test.py
new file mode 100644
index 0000000..cc30b44
--- /dev/null
+++ b/sensors_test.py
@@ -0,0 +1,12 @@
+import unittest
+
+import sensors
+
+class SensorsTest(unittest.TestCase):
+
+ def test_get_sensors(self):
+ sen = sensors.get_sensors()
+ self.assertTrue(len(sen) >= 1)
+
+if __name__ == '__main__':
+ unittest.main()