Hi Stephen,
If you do not specify site name in the query, it will look only for pages in global categories. If you added categories specific to the site, then you need to modify your query to look like this (you can replace hardcoded name of the site with CMS.SiteProvider.SiteContext.CurrentSiteName):
CustomPageProvider.GetCustomPages().OnSite("DancingGoat").InCategories("test").ToList()
To verify that you properly assigned your categories on the page, you can check it in 'Pages' application, on 'Categories' tab (under properties).
Best regards,
Dragoljub