def runTest(self): r = parseCssString('foo {}') self.assertEqual(len(r), 1, 'Element selector not returned') self.assertEqual(r[0]['selector'], 'foo', 'Selector for foo not returned') self.assertEqual(len(r[0]['properties']), 0, 'Property list for foo not empty')
def runTest(self): r = parseCssString('foo { bar: baz}') self.assertEqual(len(r), 1, 'Element selector not returned') self.assertEqual(r[0]['selector'], 'foo', 'Selector for foo not returned') self.assertEqual(len(r[0]['properties']), 1, 'Property list for foo did not have 1') self.assertEqual(r[0]['properties']['bar'], 'baz', 'Property bar did not have baz value')
def runTest(self): r = parseCssString('') self.assertEqual(len(r), 0, 'Blank string returned non-empty list') self.assertEqual(type(r), type([]), 'Blank string returned non list')