def test_fr(self):
    success = 0
    for _ in range(test_run_count):
        random_class = random.choice(get_all_classes())
        random_subject = random.choice(get_class_subjects(random_class))
        random_image = random.choice(get_images_for_subject(subject_name=self.subject_names[random_subject]))
        logging.info('Testing subject %s in class %s with image %s', random_subject, random_class, random_image)
        if (predict(img=path_to_img(random_image), class_id=random_class) == random_subject):
            success += 1
            logging.info('Test success')
        else:
            logging.warning('Test failed')
    self.assertGreaterEqual(success, int((success_perc * test_run_count)))
def test_fr(self):
    success = 0
    for _ in range(test_run_count):
        random_class = random.choice(get_all_classes())
        random_subject = random.choice(get_class_subjects(random_class))
        random_image = random.choice(get_images_for_subject(subject_name=self.subject_names[random_subject]))
        logging.info('Testing subject %s in class %s with image %s', random_subject, random_class, random_image)
        if (predict(img=path_to_img(random_image), class_id=random_class) == random_subject):
            success += 1
            logging.info('Test success')
        else:
            logging.warning('Test failed')
    self.assertGreaterEqual(success, int((success_perc * test_run_count)))