The SA Football Association said on Tuesday that Baby Bafana would face the Algerian U-23 side in Algiers on November 12 and 15 ahead of the African U-23 Championships in Morocco.
"This trip to Algeria will give my team a feeling of what to expect when they participate in the tournament later next month," said Baby Bafana coach Shakes Mashaba.
"We have selected Algeria as an opponent with the hope that the team will give us a strong challenge and help us prepare well as things will not be easy in Morocco.
"The match is also aimed at keeping the players active until we get to the tournament because we need to keep some momentum going."
The continental U-23 championships, which start on November 26, will include eight teams battling it out for three automatic spots at next year's London Olympic Games.
The fourth-placed side will go into a playoff against an Asian opponent for the last available ticket to London.
The South Africans have been drawn with Egypt, Gabon and the Ivory Coast in Group B.
Group A consists of Algeria, Nigeria, Senegal and hosts Morocco.