fixed test_class functionality