This is a process problem. The correct order to do things is: pull permit to fix plumbing, that permit will allow you to connect to the city water for testing purposes once you've proven the system will hold pressure (initial inspection), then when you're connected to the water an additional inspection will be done to verify working plumbing, if thats the only outstanding issue you can apply for a certificate of occupancy, otherwise you move onto other work.
Dealing with the government on things like this can be EXTREMELY frustrating especially if you're not used to running in those circles. Its a lot of things to learn and the people involved assume you know everything and when you get difficult they have a million ways to make your life more annoying.