initial
This commit is contained in:
14
tests/core/test_utils.py
Normal file
14
tests/core/test_utils.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from django.test import TestCase
|
||||
from wiki.core.utils import object_to_json_response
|
||||
|
||||
|
||||
class TestUtils(TestCase):
|
||||
def test_object_to_json(self):
|
||||
"""
|
||||
Simple test, the actual serialization happens in json.dumps and we
|
||||
don't wanna test this core module in depth.
|
||||
"""
|
||||
obj = []
|
||||
response = object_to_json_response(obj)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.content, b"[]")
|
||||
Reference in New Issue
Block a user