def test_notification_reshape(self, render_template): '''Test notification recipient flattener ''' notification = Notification(to_email='*****@*****.**', from_email='*****@*****.**') test_recips = [('a',), ('multi',), ['nested', 'thing']] self.assertEquals( ['a', 'multi', 'nested', 'thing'], notification.flatten(test_recips) ) test_recips_complex = ['a', ['b', ['c', 'd']], ['e']] self.assertEquals( ['a', 'b', 'c', 'd', 'e'], notification.flatten(test_recips_complex) )