Skip to content
Snippets Groups Projects
Commit cc73bc0b authored by Brian Beggs's avatar Brian Beggs
Browse files

added test to discussions_api client to test JSON response that is absent of the resp_total key

parent d9de5275
No related merge requests found
......@@ -257,6 +257,12 @@ class ThreadSerializerSerializationTest(SerializerTestMixin, SharedModuleStoreTe
serialized = self.serialize(Thread(id=thread_data["id"]))
self.assertEqual(serialized["response_count"], 2)
def test_response_count_missing(self):
thread_data = self.make_cs_content({})
del thread_data["resp_total"]
self.register_get_thread_response(thread_data)
serialized = self.serialize(Thread(id=thread_data["id"]))
self.assertIsNone(serialized["response_count"], None)
@ddt.ddt
class CommentSerializerTest(SerializerTestMixin, SharedModuleStoreTestCase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment