def test_missing_value_is_null(self): self.assertEqual( ODataFormSerializer.serialize_forms_using_config( [{}], FormExportInstance(tables=[ TableConfiguration(columns=[ ExportColumn( label='user-id', item=ExportItem(path=[PathNode(name='user_id')]), selected=True, ) ]) ])), [{ 'user-id': '---' }])
def test_unselected_column_excluded(self): self.assertEqual( ODataFormSerializer.serialize_forms_using_config( [{ 'user_id': 'the-user-id' }], FormExportInstance(tables=[ TableConfiguration(columns=[ ExportColumn( label='user-id', item=ExportItem(path=[PathNode(name='user_id')]), selected=False, ) ]) ])), [{}])