AI OnAI Off
Well, you have test content mixed with production content. One thing you could do is use different site ids and then filter on that to separate the content in the different environments.
Hope this helps.
Frederik
See the example at the bottom of the querying examples page. You get the EPiServer Site id from episerver.config (under sites) or episerverframework.config. You can also get it from code: EPiServer.Framework.Initialization.SiteMappingConfiguration.Instance.SiteId.
Frederik