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