Best way to prepare for your swim tests is to spend time in the pool swimming laps. I was in the same boat many years ago - for my original open water course we had to swim 40 lengths of a 25 metre pool. I got into the pool and trained hard, and just managed to make the 40 lengths. After completing and passing the swim tests, I never went back to the pool. That was a mistake 
When I took the Divemaster program, I was again challenged with swim tests. Back to the pool and train hard. Completed the swim tests and the Divemaster program. This time, however, I continued to swim. A regular swimming routine not only improved my health, but helped make my dive times longer with less air consumption.
I worked my way up to the point that I was regularly doing two mile swims, and when I felt good, an occasional three mile swim.
Unfortunately many years of swimming led to other issues, including rotator cuff problems in both shoulders. I have had to give up swimming and miss the time in the pool, but the time I did spend swimming lengths was time well spent.
Divegoose

When I took the Divemaster program, I was again challenged with swim tests. Back to the pool and train hard. Completed the swim tests and the Divemaster program. This time, however, I continued to swim. A regular swimming routine not only improved my health, but helped make my dive times longer with less air consumption.

Unfortunately many years of swimming led to other issues, including rotator cuff problems in both shoulders. I have had to give up swimming and miss the time in the pool, but the time I did spend swimming lengths was time well spent.
Divegoose