I agree this isn't an ideal test.  The problem is that importing the serializer inside the test method actually won't cause the error—it is only encountered when imported top level (which would otherwise be the case).  The test here is close to meaningless.  I just wanted something to explicitly show that the top-level import succeeded.