17 lines
471 B
Python
17 lines
471 B
Python
__author__ = 'stubbfel'
|
|
|
|
import unittest
|
|
import utilities.jsonutility as ju
|
|
|
|
|
|
class JsonUtilitiesTest(unittest.TestCase):
|
|
def test_write_json_returns_error_if_json_object_is_emptystring(self):
|
|
self.assertRaises(ValueError, ju.write_json, "test.json", "")
|
|
|
|
def test_write_json_returns_error_if_json_object_is_wrong_json_string(self):
|
|
self.assertRaises(ValueError, ju.write_json, "test.json", "{1}")
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|