manjaro-hello/test/test.py

18 lines
479 B
Python
Raw Permalink Normal View History

2016-12-18 00:55:34 +01:00
import unittest
from src import manjaro_hello
2016-12-21 15:35:54 +01:00
2016-12-18 00:55:34 +01:00
class ManjaroHello(unittest.TestCase):
def setUp(self):
self.path = "test/"
def test_read_json(self):
json = manjaro_hello.read_json(self.path + "test.json")
2016-12-21 15:35:54 +01:00
self.assertEqual(json, {"test": "json"})
2016-12-18 00:55:34 +01:00
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)