Exemplo n.º 1
0
 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')
Exemplo n.º 2
0
 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')
Exemplo n.º 3
0
 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')
Exemplo n.º 4
0
 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')
Exemplo n.º 5
0
 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')
Exemplo n.º 6
0
 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')