'FortunaGenerator.AESGenerator'

def test_generator(self):

    fg = FortunaGenerator.AESGenerator()
    self.assertRaises(Exception, fg.pseudo_random_data, 1)
    self.assertEqual(0, fg.counter.next_value())
    fg.reseed(b('Hello'))
    self.assertEqual(b('0ea6919d4361551364242a4ba890f8f073676e82cf1a52bb880f7e496648b565'), b2a_hex(fg.key))
    self.assertEqual(1, fg.counter.next_value())
    self.assertEqual((b('7cbe2c17684ac223d08969ee8b565616') + b('717661c0d2f4758bd6ba140bf3791abd')), b2a_hex(fg.pseudo_random_data(32)))
    self.assertEqual((b('33a1bb21987859caf2bbfc5615bef56d') + b('e6b71ff9f37112d0c193a135160862b7')), b2a_hex(fg.key))
    self.assertEqual(5, fg.counter.next_value())
    self.assertEqual((b('fd6648ba3086e919cee34904ef09a7ff') + b('021f77580558b8c3e9248275f23042bf')), b2a_hex(fg.pseudo_random_data(32)))
    self.assertRaises(AssertionError, fg._pseudo_random_data, ((2 ** 20) + 1))
