Fix test cases in test_add_extensions