def test_color_embedded_stylesheet(self):
    svg = ElementTree.fromstring((((XML_HEADER + b'<svg width="10" height="10">') + b'<stYLe>\n.some_class{\nfill:#123; STroke: grey;}\n</stYLe>\n') + b'<g class="some_class"></g></svg>'))
    with self.settings(SVG_COLORS={'white': '#fff', 'green': '#0f5'}):
        result = svg_util.color_icon(svg)
        self.assertEqual(2, len(result))
        self.assertTrue(('white' in result))
        self.assertTrue(('green' in result))
        self.assertTrue((b'fill: #fff;' in ElementTree.tostring(result['white'])))
        self.assertTrue((b'stroke: #0f5;' in ElementTree.tostring(result['green'])))
def test_color_embedded_stylesheet(self):
    svg = ElementTree.fromstring((((XML_HEADER + b'<svg width="10" height="10">') + b'<stYLe>\n.some_class{\nfill:#123; STroke: grey;}\n</stYLe>\n') + b'<g class="some_class"></g></svg>'))
    with self.settings(SVG_COLORS={'white': '#fff', 'green': '#0f5'}):
        result = svg_util.color_icon(svg)
        self.assertEqual(2, len(result))
        self.assertTrue(('white' in result))
        self.assertTrue(('green' in result))
        self.assertTrue((b'fill: #fff;' in ElementTree.tostring(result['white'])))
        self.assertTrue((b'stroke: #0f5;' in ElementTree.tostring(result['green'])))