test_generator: Check some exceptions in tests
Fixed some unit tests