def test_ToJSONIgnoreNone(self): adef = ActivityDefinition({ 'description': { 'en-US': 'test' }, 'more_info': None }) self.assertEqual(adef.to_json(), '{"description": {"en-US": "test"}}')
def test_ToJSONEmpty(self): adef = ActivityDefinition() self.assertEqual(adef.to_json(), '{}')
def test_ToJSONEmpty(self): adef = ActivityDefinition() self.assertEqual(adef.to_json(), "{}")
def test_ToJSONIgnoreNone(self): adef = ActivityDefinition({"description": {"en-US": "test"}, "more_info": None}) self.assertEqual(adef.to_json(), '{"description": {"en-US": "test"}}')