def test_methods(self):
     csvd0 = CsvData()
     csvd1 = CsvData(OrderedDict(foo='foo', bar=1))
     csvd0.expand(csvd1)
     self.assert_equal(csvd0.fields, ['foo', 'bar'])
     self.assert_equal(csvd0.data, [['foo', 1]])
     csvd2 = CsvData(OrderedDict(foo='foo1', bar=2))
     csvd0.append(csvd2)
     self.assert_equal(csvd0.fields, ['foo', 'bar'])
     self.assert_equal(csvd0.data, [['foo', 1], ['foo1', 2]])
 def test_methods(self):
     csvd0 = CsvData()
     od1 = OrderedDict()
     od1['foo'] = 'foo'
     od1['bar'] = 1
     csvd1 = CsvData(od1)
     csvd0.expand(csvd1)
     self.assert_equal(csvd0.fields, ['foo', 'bar'])
     self.assert_equal(csvd0.data, [['foo', 1]])
     od2 = OrderedDict()
     od2['foo'] = 'foo1'
     od2['bar'] = 2
     csvd2 = CsvData(od2)
     csvd0.append(csvd2)
     self.assert_equal(csvd0.fields, ['foo', 'bar'])
     self.assert_equal(csvd0.data, [['foo', 1], ['foo1', 2]])
 def test_methods(self):
     csvd0 = CsvData()
     od1 = OrderedDict()
     od1['foo'] = 'foo'
     od1['bar'] = 1
     csvd1 = CsvData(od1)
     csvd0.expand(csvd1)
     csvd0.fields == ['foo', 'bar'] # pylint: disable=W0104
     csvd0.data == [['foo', 1]] # pylint: disable=W0104
     od2 = OrderedDict()
     od2['foo'] = 'foo1'
     od2['bar'] = 2
     csvd2 = CsvData(od2)
     csvd0.append(csvd2)
     assert csvd0.fields == ['foo', 'bar']
     assert csvd0.data == [['foo', 1], ['foo1', 2]]
 def test_methods(self):
     csvd0 = CsvData()
     csvd1 = CsvData(OrderedDict(foo='foo', bar=1))
     csvd0.expand(csvd1)
     self.assert_equal(csvd0.fields, ['foo', 'bar'])
     self.assert_equal(csvd0.data, [['foo', 1]])
     csvd2 = CsvData(OrderedDict(foo='foo1', bar=2))
     csvd0.append(csvd2)
     self.assert_equal(csvd0.fields, ['foo', 'bar'])
     self.assert_equal(csvd0.data, [['foo', 1], ['foo1', 2]])
Exemple #5
0
 def test_methods(self):
     csvd0 = CsvData()
     od1 = OrderedDict()
     od1['foo'] = 'foo'
     od1['bar'] = 1
     csvd1 = CsvData(od1)
     csvd0.expand(csvd1)
     csvd0.fields == ['foo', 'bar']  # pylint: disable=W0104
     csvd0.data == [['foo', 1]]  # pylint: disable=W0104
     od2 = OrderedDict()
     od2['foo'] = 'foo1'
     od2['bar'] = 2
     csvd2 = CsvData(od2)
     csvd0.append(csvd2)
     assert csvd0.fields == ['foo', 'bar']
     assert csvd0.data == [['foo', 1], ['foo1', 2]]