When I travelled to CPT a few years back, it was necessary to clear immigration and customs at JNB, hence bags had to be collected in international arrival followed by a short walk to domestic departures check-in and bags checked back in for the JNB/CPT flight which is classed as a domestic sector. You will probably need to allow a minimum of 60 mins for the whole process especially if a few international flights are arriving at the same time.