def METHOD_NAME(self):
    iterator = account.parents('Assets:Bank:Checking')
    self.assertIsInstance(iterator, types.GeneratorType)
    self.assertEqual(['Assets:Bank:Checking', 'Assets:Bank', 'Assets'],
                     list(iterator))