They were citizens of the USSR, not Latvia. If they would like to become citizens of Latvia, it is not unreasonable that they take a few tests.
It sounds very reasonable indeed except one little thing: almost everybody there by 1991 were citizens of the USSR. However, some of the former Soviet citizens living in Latvia were given the citizenship without any tests and some of them were not.
There were no citizens of Latvia until 1990. When Latvia obtained its independence, the equitable thing to do would have been to grant blanket citizenship to any citizen of the former USSR then living within Latvia's borders.
Basing citizenship on some racial or ethnic standards is distasteful, to say the least.