def test_formatPipeDelimitedData_list(self): assert APIUtils.formatPipeDelimitedData( ['test|object', None, 'another|thing'], ['one', 'two']) == [{ 'one': 'test', 'two': 'object' }, { 'one': 'another', 'two': 'thing' }]
def test_formatPipeDelimitedData_none(self): assert APIUtils.formatPipeDelimitedData(None, ['one', 'two']) is None
def test_formatPipeDelimitedData_string(self): assert APIUtils.formatPipeDelimitedData('test|object', ['one', 'two'])\ == {'one': 'test', 'two': 'object'}