def test_validation(self):
        test = Visualization()
        test.axes.append({'bad axes': 'ShouldRaiseError'})
        with nt.assert_raises(ValidationError) as err:
            test.validate()
        nt.assert_equal(err.exception.args[0],
                        'invalid contents: axes[0] must be Axis')
Test validation of grammar
dataset/ETHPy150Open wrobstory/vincent/tests/test_vega.py/TestGrammarClass.test_validation