Do car insurance companies know when you receive a moving violation?

When you ask for a new car insurance quote from your current or a new provider they always ask the question if you have been involved in an accident or have been pulled over recently etc, etc. My question is, do they already know this info and are they maybe testing me or do they really don't know? I've had two moving violations within the past 5 years and I'm wondering how to answer these questions when I shop for insurance on a new vehicle.