I wouldn't bother changing this test, but in the future, it's often nicer to make the negative test a separate test. It makes this test a little shorter, and really you have two different tests here.

In fact, it might have also been better to make test_sort_ascending, test_sort_descending, test_sort_invalid tests just to be super clear about what each test does.

Again, I'm not recommending that you change it now, but in the future try to make tests a little more atomic.