Introduce unittest

This commit is contained in:
Hugo Posnic
2016-12-18 01:15:20 +01:00
parent 45e1d47c1c
commit faefc0e63d
9 changed files with 29 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
import unittest
from src import manjaro_hello
class ManjaroHello(unittest.TestCase):
def setUp(self):
self.path = "test/"
def test_read_json(self):
json = manjaro_hello.read_json(self.path + "test.json")
self.assertEqual(json, {"test":"json"})
json = manjaro_hello.read_json(self.path + "test")
self.assertEqual(json, None)
def test_get_lsb_infos(self):
self.assertIsInstance(manjaro_hello.get_lsb_infos(), dict)