def test_flatten(self):
    c = Collection({'foo': [5, 6], 'bar': 7, 'baz': {'boom': [1, 2, 3, 4]}})
    self.assertEqual([1, 2, 3, 4, 5, 6, 7], c.flatten().sort().all())
    c = Collection([1, [2, 3], 4])
    self.assertEqual([1, 2, 3, 4], c.flatten().all())
def test_flatten(self):
    c = Collection({'foo': [5, 6], 'bar': 7, 'baz': {'boom': [1, 2, 3, 4]}})
    self.assertEqual([1, 2, 3, 4, 5, 6, 7], c.flatten().sort().all())
    c = Collection([1, [2, 3], 4])
    self.assertEqual([1, 2, 3, 4], c.flatten().all())