def test_implode(self):
    obj1 = type('lamdbaobject', (object,), {})()
    obj1.name = 'john'
    obj1.email = 'foo'
    c = Collection([{'name': 'john', 'email': 'foo'}, {'name': 'jane', 'email': 'bar'}])
    self.assertEqual('foobar', c.implode('email'))
    self.assertEqual('foo,bar', c.implode('email', ','))
    c = Collection(['foo', 'bar'])
    self.assertEqual('foobar', c.implode(''))
    self.assertEqual('foo,bar', c.implode(','))
def test_implode(self):
    obj1 = type('lamdbaobject', (object,), {})()
    obj1.name = 'john'
    obj1.email = 'foo'
    c = Collection([{'name': 'john', 'email': 'foo'}, {'name': 'jane', 'email': 'bar'}])
    self.assertEqual('foobar', c.implode('email'))
    self.assertEqual('foo,bar', c.implode('email', ','))
    c = Collection(['foo', 'bar'])
    self.assertEqual('foobar', c.implode())
    self.assertEqual('foo,bar', c.implode(','))