[test] patch tests and fix several other bugs related to branding